1From 917133acc701dbc4636165d3b08d15dc5829a06f Mon Sep 17 00:00:00 2001 2From: Hongxu Jia <hongxu.jia@windriver.com> 3Date: Wed, 17 Aug 2016 04:06:34 -0400 4Subject: [PATCH] grub module explicitly keeps symbole .module_license 5 6While using oe-core toolchain to strip grub module 'all_video.mod', 7it stripped symbol table: 8 9--------------- 10root@localhost:~# objdump -t all_video.mod 11 12all_video.mod: file format elf64-x86-64 13 14SYMBOL TABLE: 15no symbols 16-------------- 17 18It caused grub to load module all_video failed. 19-------------- 20grub> insmod all_video 21error: no symbol table. 22-------------- 23 24Tweak strip option to keep symbol .module_license could workaround 25the issue. 26-------------- 27root@localhost:~# objdump -t all_video.mod 28 29all_video.mod: file format elf64-x86-64 30 31SYMBOL TABLE: 320000000000000000 l d .text 0000000000000000 .text 330000000000000000 l d .data 0000000000000000 .data 340000000000000000 l d .module_license 0000000000000000 .module_license 350000000000000000 l d .bss 0000000000000000 .bss 360000000000000000 l d .moddeps 0000000000000000 .moddeps 370000000000000000 l d .modname 0000000000000000 .modname 38-------------- 39 40Upstream-Status: Pending 41 42Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 43--- 44 grub-core/genmod.sh.in | 2 +- 45 1 file changed, 1 insertion(+), 1 deletion(-) 46 47diff --git a/grub-core/genmod.sh.in b/grub-core/genmod.sh.in 48index 1250589..dd14308 100644 49--- a/grub-core/genmod.sh.in 50+++ b/grub-core/genmod.sh.in 51@@ -56,7 +56,7 @@ if test x@TARGET_APPLE_LINKER@ != x1; then 52 if test x@platform@ != xemu; then 53 @TARGET_STRIP@ --strip-unneeded \ 54 -K grub_mod_init -K grub_mod_fini \ 55- -K _grub_mod_init -K _grub_mod_fini \ 56+ -K _grub_mod_init -K _grub_mod_fini -K .module_license \ 57 -R .note.gnu.gold-version -R .note.GNU-stack \ 58 -R .gnu.build.attributes \ 59 -R .rel.gnu.build.attributes \ 60