summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--user/efivar/APKBUILD4
-rw-r--r--user/grub/APKBUILD4
-rw-r--r--user/grub/x86_64_asm.patch73
3 files changed, 78 insertions, 3 deletions
diff --git a/user/efivar/APKBUILD b/user/efivar/APKBUILD
index c9283bbdb..bcfcc3a2a 100644
--- a/user/efivar/APKBUILD
+++ b/user/efivar/APKBUILD
@@ -1,7 +1,7 @@
# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=efivar
-pkgver=36
+pkgver=37
pkgrel=0
pkgdesc="Tools and library to manipulate EFI variables"
url="https://github.com/rhboot/efivar"
@@ -26,5 +26,5 @@ package() {
make DESTDIR="$pkgdir" prefix="/usr" libdir="/usr/lib" install
}
-sha512sums="951feabe2d238826fdd6e74e8f7a24f04d705f9ef925cfcfb852944d2d7a4f04e3a6c23f276c40e5564da42614558941dbe7aaf21efa6a722a616e4d165aba2d efivar-36.tar.bz2
+sha512sums="305a82ed103c7e3d8f723934019d552677c73558768dd5341f87d0364f5c60824d24f5a8e1bf90075e825908085083d4ecdccec5ac757fd38ee6ac8fea28c3e4 efivar-37.tar.bz2
8a47abad5d6d2ceffb5effdd177d3e678256961294ff66df1158084e3f45f0bcb07105a1c3df35b3a5c503742c4e59148df740c40fa3b7149b1f609f8b51ebd3 0001-makeguids-Ensure-compatibility-with-other-libcs.patch"
diff --git a/user/grub/APKBUILD b/user/grub/APKBUILD
index 532b0aa48..7c3123ecb 100644
--- a/user/grub/APKBUILD
+++ b/user/grub/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=grub
pkgver=2.02
-pkgrel=5
+pkgrel=6
pkgdesc="Bootloader with support for Linux, Multiboot and more"
url="https://www.gnu.org/software/grub/"
arch="all !s390x"
@@ -32,6 +32,7 @@ source="https://ftp.gnu.org/gnu/grub/grub-$pkgver.tar.xz
grub2-accept-empty-module.patch
grub-xen-host_grub.cfg
the-arch-everyone-uses-and-nobody-loves.patch
+ x86_64_asm.patch
default-grub
"
@@ -158,4 +159,5 @@ f2a7d9ab6c445f4e402e790db56378cecd6631b5c367451aa6ce5c01cd95b95c83c3dd24d6d4b857
098a1742aef131c85d63b934a9815879b991f2e73030cb90ac4b5dcd07d249fa0dd0a281e52ada0e10f05d59223493bd416eb47543242bf0ba336a0ebc9b2a1a grub2-accept-empty-module.patch
4e7394e0fff6772c89683039ccf81099ebbfe4f498e6df408977a1488fd59389b6e19afdbf0860ec271e2b2aea0df7216243dcc8235d1ca3af0e7f4d0a9d60a4 grub-xen-host_grub.cfg
088455205f2f397d60e43eab19ed73994880ea1f442661f7975846cceaf2b112d92fd1341119d7dbfad3af2174dfd4d4721f31dead1ac35f4a3cb7c0d92f8a04 the-arch-everyone-uses-and-nobody-loves.patch
+271fdcfbdec567802b351e0a6c38a227ff4ad4eb17533cfa433398fa0929645671a2bfebcc7911d71c1fc3ced94985de148c153834bd2d62018f033eedfbdaf7 x86_64_asm.patch
048d061ac0aab0106f59a3d257739ff5de6c7dc08a4dc9b8b12e9bd2b1ec11f9bc6214013f3d1083b11c3ce41185fcbb5615beb2f290380abf392bb4c3f0d509 default-grub"
diff --git a/user/grub/x86_64_asm.patch b/user/grub/x86_64_asm.patch
new file mode 100644
index 000000000..9ce48165d
--- /dev/null
+++ b/user/grub/x86_64_asm.patch
@@ -0,0 +1,73 @@
+From 842c390469e2c2e10b5aa36700324cd3bde25875 Mon Sep 17 00:00:00 2001
+From: "H.J. Lu" <hjl.tools@gmail.com>
+Date: Sat, 17 Feb 2018 06:47:28 -0800
+Subject: [PATCH] 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>
+---
+ grub-core/efiemu/i386/loadcore64.c | 1 +
+ grub-core/kern/x86_64/dl.c | 1 +
+ util/grub-mkimagexx.c | 1 +
+ util/grub-module-verifier.c | 1 +
+ 4 files changed, 4 insertions(+)
+
+diff --git a/grub-core/efiemu/i386/loadcore64.c b/grub-core/efiemu/i386/loadcore64.c
+index e49d0b6..18facf4 100644
+--- a/grub-core/efiemu/i386/loadcore64.c
++++ b/grub-core/efiemu/i386/loadcore64.c
+@@ -98,6 +98,7 @@ grub_arch_efiemu_relocate_symbols64 (grub_efiemu_segment_t segs,
+ break;
+
+ case R_X86_64_PC32:
++ case R_X86_64_PLT32:
+ err = grub_efiemu_write_value (addr,
+ *addr32 + rel->r_addend
+ + sym.off
+diff --git a/grub-core/kern/x86_64/dl.c b/grub-core/kern/x86_64/dl.c
+index 4406906..3a73e6e 100644
+--- a/grub-core/kern/x86_64/dl.c
++++ b/grub-core/kern/x86_64/dl.c
+@@ -70,6 +70,7 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr,
+ break;
+
+ case R_X86_64_PC32:
++ case R_X86_64_PLT32:
+ {
+ grub_int64_t value;
+ value = ((grub_int32_t) *addr32) + rel->r_addend + sym->st_value -
+diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
+index a2bb054..39d7efb 100644
+--- a/util/grub-mkimagexx.c
++++ b/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
+--- a/util/grub-module-verifier.c
++++ b/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.9.1
+