mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
grub: ignore missing .symtab in modules
old binutis add an empty .symtab section at stripping and grub check that this exists also on modules that export no symbols. Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
This commit is contained in:
1
lfs/grub
1
lfs/grub
@@ -80,6 +80,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-2.00_disable_vga_fallback.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/0001-Fix-CVE-2015-8370-Grub2-user-pass-vulnerability.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub2-remove-gets.patch
|
||||
cd $(DIR_APP) && patch -Np1 < $(DIR_SRC)/src/patches/grub-2.00_ignore_missing_symtab.patch
|
||||
cd $(DIR_APP) && \
|
||||
./configure \
|
||||
--prefix=/usr \
|
||||
|
||||
40
src/patches/grub-2.00_ignore_missing_symtab.patch
Normal file
40
src/patches/grub-2.00_ignore_missing_symtab.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
diff -Naur grub-2.00.org/grub-core/kern/dl.c grub-2.00/grub-core/kern/dl.c
|
||||
--- grub-2.00.org/grub-core/kern/dl.c 2012-06-22 17:26:38.000000000 +0200
|
||||
+++ grub-2.00/grub-core/kern/dl.c 2017-07-05 10:45:25.501645684 +0200
|
||||
@@ -354,8 +354,11 @@
|
||||
if (s->sh_type == SHT_SYMTAB)
|
||||
break;
|
||||
|
||||
+ /* Module without symbol table may still be used to pull in dependencies.
|
||||
+ We verify at build time that such modules do not contain any relocations
|
||||
+ that may reference symbol table. */
|
||||
if (i == e->e_shnum)
|
||||
- return grub_error (GRUB_ERR_BAD_MODULE, N_("no symbol table"));
|
||||
+ return GRUB_ERR_NONE;
|
||||
|
||||
#ifdef GRUB_MODULES_MACHINE_READONLY
|
||||
mod->symtab = grub_malloc (s->sh_size);
|
||||
diff -Naur grub-2.00.org/grub-core/kern/i386/dl.c grub-2.00/grub-core/kern/i386/dl.c
|
||||
--- grub-2.00.org/grub-core/kern/i386/dl.c 2012-02-26 12:14:21.000000000 +0100
|
||||
+++ grub-2.00/grub-core/kern/i386/dl.c 2017-07-05 17:01:43.333955065 +0200
|
||||
@@ -55,7 +55,7 @@
|
||||
break;
|
||||
|
||||
if (i == e->e_shnum)
|
||||
- return grub_error (GRUB_ERR_BAD_MODULE, N_("no symbol table"));
|
||||
+ return GRUB_ERR_NONE;
|
||||
|
||||
entsize = s->sh_entsize;
|
||||
|
||||
diff -Naur grub-2.00.org/grub-core/kern/x86_64/dl.c grub-2.00/grub-core/kern/x86_64/dl.c
|
||||
--- grub-2.00.org/grub-core/kern/x86_64/dl.c 2012-02-26 12:14:56.000000000 +0100
|
||||
+++ grub-2.00/grub-core/kern/x86_64/dl.c 2017-07-05 17:02:23.374574458 +0200
|
||||
@@ -55,7 +55,7 @@
|
||||
break;
|
||||
|
||||
if (i == e->e_shnum)
|
||||
- return grub_error (GRUB_ERR_BAD_MODULE, N_("no symbol table"));
|
||||
+ return GRUB_ERR_NONE;
|
||||
|
||||
entsize = s->sh_entsize;
|
||||
|
||||
Reference in New Issue
Block a user