diff options
Diffstat (limited to 'packages/glibc')
-rw-r--r-- | packages/glibc/2.26/0001-aarch64-rewrite-elf_machine_load_address.patch | 75 | ||||
-rw-r--r-- | packages/glibc/2.27/0000-typedef-caddr.patch | 17 | ||||
-rw-r--r-- | packages/glibc/2.27/chksum | 12 | ||||
-rw-r--r-- | packages/glibc/2.27/version.desc | 0 |
4 files changed, 104 insertions, 0 deletions
diff --git a/packages/glibc/2.26/0001-aarch64-rewrite-elf_machine_load_address.patch b/packages/glibc/2.26/0001-aarch64-rewrite-elf_machine_load_address.patch new file mode 100644 index 0000000..14c0780 --- /dev/null +++ b/packages/glibc/2.26/0001-aarch64-rewrite-elf_machine_load_address.patch @@ -0,0 +1,75 @@ +commit a68ba2f3cd3cbe32c1f31e13c20ed13487727b32 +Author: Szabolcs Nagy <szabolcs.nagy@arm.com> +Date: Wed Oct 18 17:26:23 2017 +0100 + + [AARCH64] Rewrite elf_machine_load_address using _DYNAMIC symbol + + This patch rewrites aarch64 elf_machine_load_address to use special _DYNAMIC + symbol instead of _dl_start. + + The static address of _DYNAMIC symbol is stored in the first GOT entry. + Here is the change which makes this solution work (part of binutils 2.24): + https://sourceware.org/ml/binutils/2013-06/msg00248.html + + i386, x86_64 targets use the same method to do this as well. + + The original implementation relies on a trick that R_AARCH64_ABS32 relocation + being resolved at link time and the static address fits in the 32bits. + However, in LP64, normally, the address is defined to be 64 bit. + + Here is the C version one which should be portable in all cases. + + * sysdeps/aarch64/dl-machine.h (elf_machine_load_address): Use + _DYNAMIC symbol to calculate load address. + +--- + sysdeps/aarch64/dl-machine.h | 37 ++++--------------------------------- + 1 file changed, 4 insertions(+), 33 deletions(-) + +--- a/sysdeps/aarch64/dl-machine.h ++++ b/sysdeps/aarch64/dl-machine.h +@@ -51,40 +51,11 @@ + /* To figure out the load address we use the definition that for any symbol: + dynamic_addr(symbol) = static_addr(symbol) + load_addr + +- The choice of symbol is arbitrary. The static address we obtain +- by constructing a non GOT reference to the symbol, the dynamic +- address of the symbol we compute using adrp/add to compute the +- symbol's address relative to the PC. +- This depends on 32/16bit relocations being resolved at link time +- and that the static address fits in the 32/16 bits. */ ++ _DYNAMIC sysmbol is used here as its link-time address stored in ++ the special unrelocated first GOT entry. */ + +- ElfW(Addr) static_addr; +- ElfW(Addr) dynamic_addr; +- +- asm (" \n" +-" adrp %1, _dl_start; \n" +-#ifdef __LP64__ +-" add %1, %1, #:lo12:_dl_start \n" +-#else +-" add %w1, %w1, #:lo12:_dl_start \n" +-#endif +-" ldr %w0, 1f \n" +-" b 2f \n" +-"1: \n" +-#ifdef __LP64__ +-" .word _dl_start \n" +-#else +-# ifdef __AARCH64EB__ +-" .short 0 \n" +-# endif +-" .short _dl_start \n" +-# ifndef __AARCH64EB__ +-" .short 0 \n" +-# endif +-#endif +-"2: \n" +- : "=r" (static_addr), "=r" (dynamic_addr)); +- return dynamic_addr - static_addr; ++ extern ElfW(Dyn) _DYNAMIC[] attribute_hidden; ++ return (ElfW(Addr)) &_DYNAMIC - elf_machine_dynamic (); + } + + /* Set up the loaded object described by L so its unrelocated PLT diff --git a/packages/glibc/2.27/0000-typedef-caddr.patch b/packages/glibc/2.27/0000-typedef-caddr.patch new file mode 100644 index 0000000..980939b --- /dev/null +++ b/packages/glibc/2.27/0000-typedef-caddr.patch @@ -0,0 +1,17 @@ +--- + posix/sys/types.h | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/posix/sys/types.h ++++ b/posix/sys/types.h +@@ -113,7 +113,10 @@ + #ifdef __USE_MISC + # ifndef __daddr_t_defined + typedef __daddr_t daddr_t; ++# if ! defined(caddr_t) && ! defined(__caddr_t_defined) + typedef __caddr_t caddr_t; ++# define __caddr_t_defined ++# endif + # define __daddr_t_defined + # endif + #endif diff --git a/packages/glibc/2.27/chksum b/packages/glibc/2.27/chksum new file mode 100644 index 0000000..5e7165b --- /dev/null +++ b/packages/glibc/2.27/chksum @@ -0,0 +1,12 @@ +md5 glibc-2.27.tar.xz 898cd5656519ffbc3a03fe811dd89e82 +sha1 glibc-2.27.tar.xz 1f7a9c43026484943ef7cf6885f2176a2bc1e093 +sha256 glibc-2.27.tar.xz 5172de54318ec0b7f2735e5a91d908afe1c9ca291fec16b5374d9faadfc1fc72 +sha512 glibc-2.27.tar.xz 7c5581154487d38d173ce1feb944e60207139cca148bccf066eaae322c0c2d219423bdcfa15c7f9be1b5e45dfc43c641cc5d80d3c3c65837d08a83cdb4e2a147 +md5 glibc-2.27.tar.bz2 274e794c999b4ebbccdf72bfb4c49a68 +sha1 glibc-2.27.tar.bz2 fc9fe8adcbbab359b286ca22f793796b4c9c395f +sha256 glibc-2.27.tar.bz2 e49c919c83579984f7c2442243861d04227e8dc831a08d7bf60cdacfdcd08797 +sha512 glibc-2.27.tar.bz2 05cbb749d9ae2a742b50ef42e4d88fc501cbadadfd105d7c21e07293403dc509ec3476b784e4cd613c34df166d7c12f7a3a5373d4d1cbdbd7c98e091caa75ce4 +md5 glibc-2.27.tar.gz 527bc6270e37ab97314a3af0b7b83db8 +sha1 glibc-2.27.tar.gz 405a3523316b441d1812eafe0013eb78512d5eb5 +sha256 glibc-2.27.tar.gz 881ca905e6b5eec724de7948f14d66a07d97bdee8013e1b2a7d021ff5d540522 +sha512 glibc-2.27.tar.gz a42cf88bd9965c1ad95579672f32809d5555d8f035305f25f76240c5735ea15029d7c818501139d6a2faf834bf75f57cbe6d28a42083d6a3cb2a1d8e8117b4ad diff --git a/packages/glibc/2.27/version.desc b/packages/glibc/2.27/version.desc new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/packages/glibc/2.27/version.desc |