mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 06:33:50 +02:00
grub: add patch to support binutils-2.31.1
See: #2813 Signed-off-by: Jürgen Buchmüller <pullmoll@t-online.de>
This commit is contained in:
parent
5739e93df4
commit
3f96291979
2 changed files with 35 additions and 2 deletions
33
srcpkgs/grub/patches/grub-mkimage-R_X86_64_PLT32.patch
Normal file
33
srcpkgs/grub/patches/grub-mkimage-R_X86_64_PLT32.patch
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
x86-64: Treat R_X86_64_PLT32 as R_X86_64_PC32
|
||||||
|
|
||||||
|
Starting from binutils commit bd7ab16b4537788ad53521c45469a1bdae84ad4a:
|
||||||
|
https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=bd7ab16b4537788ad53521c45469a1bdae84ad4a
|
||||||
|
x86-64 assembler generates R_X86_64_PLT32, instead of R_X86_64_PC32, for
|
||||||
|
32-bit PC-relative branches. Grub2 should treat R_X86_64_PLT32 as
|
||||||
|
R_X86_64_PC32.
|
||||||
|
|
||||||
|
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
||||||
|
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
||||||
|
|
||||||
|
--- util/grub-mkimagexx.c
|
||||||
|
+++ util/grub-mkimagexx.c
|
||||||
|
@@ -841,6 +841,7 @@ SUFFIX (relocate_addresses) (Elf_Ehdr *e, Elf_Shdr *sections,
|
||||||
|
break;
|
||||||
|
|
||||||
|
case R_X86_64_PC32:
|
||||||
|
+ case R_X86_64_PLT32:
|
||||||
|
{
|
||||||
|
grub_uint32_t *t32 = (grub_uint32_t *) target;
|
||||||
|
*t32 = grub_host_to_target64 (grub_target_to_host32 (*t32)
|
||||||
|
diff --git a/util/grub-module-verifier.c b/util/grub-module-verifier.c
|
||||||
|
index 9179285..a79271f 100644
|
||||||
|
--- util/grub-module-verifier.c
|
||||||
|
+++ util/grub-module-verifier.c
|
||||||
|
@@ -19,6 +19,7 @@ struct grub_module_verifier_arch archs[] = {
|
||||||
|
-1
|
||||||
|
}, (int[]){
|
||||||
|
R_X86_64_PC32,
|
||||||
|
+ R_X86_64_PLT32,
|
||||||
|
-1
|
||||||
|
}
|
||||||
|
},
|
|
@ -1,8 +1,8 @@
|
||||||
# Template file for 'grub'
|
# Template file for 'grub'
|
||||||
pkgname=grub
|
pkgname=grub
|
||||||
version=2.02
|
version=2.02
|
||||||
revision=2
|
revision=3
|
||||||
hostmakedepends="flex"
|
hostmakedepends="flex freetype-devel"
|
||||||
makedepends="libusb-compat-devel ncurses-devel freetype-devel
|
makedepends="libusb-compat-devel ncurses-devel freetype-devel
|
||||||
liblzma-devel device-mapper-devel font-unifont-bdf fuse-devel"
|
liblzma-devel device-mapper-devel font-unifont-bdf fuse-devel"
|
||||||
depends="os-prober"
|
depends="os-prober"
|
||||||
|
|
Loading…
Add table
Reference in a new issue