public inbox for libc-stable@sourceware.org
 help / color / mirror / Atom feed
* Re: [GLIBC][AARCH64]Rewrite elf_machine_load_address using _DYNAMIC symbol
  2018-01-01  0:00       ` [GLIBC][AARCH64]Rewrite elf_machine_load_address using _DYNAMIC symbol Aurelien Jarno
@ 2018-01-01  0:00         ` Adhemerval Zanella
  2018-01-01  0:00         ` Szabolcs Nagy
  1 sibling, 0 replies; 3+ messages in thread
From: Adhemerval Zanella @ 2018-01-01  0:00 UTC (permalink / raw)
  To: libc-stable



On 25/01/2018 19:11, Aurelien Jarno wrote:
> Hi,
> 
> On 2017-10-18 11:32, Renlin Li wrote:
>> Hi Szabolcs,
>>
>> Here is the C version one which should be portable in all cases.
>> aarch64 native glibc regression test checked Okay.
>>
>> Regards,
>> Renlin
>>
>> ChangeLog:
>>
>> 2017-10-18  Renlin Li  <renlin.li@arm.com>
>>
>> 	* sysdeps/aarch64/dl-machine.h (elf_machine_load_address): Use
>> 	_DYNAMIC symbol to calculate load address.
>>
> 
> I do not know the exact reason of this patch, but my guess is that its
> goal is to fix building with recent binutils version. Indeed with a
> recent snapshot of the binutils 2.30 branch, glibc versions withtout
> this patch fail to build on aarch64 during the linking of ld.so:
> 
> ...
> 
> |  aarch64-linux-gnu-gcc-7 -no-pie -fno-PIE   -nostdlib -nostartfiles -shared -o /home/aurel32/glibc-2.26/build-tree/arm64-libc/elf/ld.so.new              \
> |            -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs       \
> |            /home/aurel32/glibc-2.26/build-tree/arm64-libc/elf/librtld.os -Wl,--version-script=/home/aurel32/glibc-2.26/build-tree/arm64-libc/ld.map              \
> |            -Wl,-soname=ld-linux-aarch64.so.1                     \
> |            -Wl,-defsym=_begin=0
> |  /usr/bin/ld: /home/aurel32/glibc-2.26/build-tree/arm64-libc/elf/librtld.os: relocation R_AARCH64_ABS32 against `a local symbol' can not be used when making a shared object
> |  /usr/bin/ld: BFD (GNU Binutils for Debian) 2.29.90.20180122 assertion fail ../../bfd/elfnn-aarch64.c:4386
> |  /usr/bin/ld: BFD (GNU Binutils for Debian) 2.29.90.20180122 assertion fail ../../bfd/elfnn-aarch64.c:4386
> |  /home/aurel32/glibc-2.26/build-tree/arm64-libc/elf/librtld.os: In function `process_envvars':
> |  /home/aurel32/glibc-2.26/elf/rtld.c:2499:(.text+0x108c): relocation truncated to fit: R_AARCH64_LD64_GOT_LO12_NC against symbol `audit_list_string' defined in COMMON section in /home/aurel32/glibc-2.26/build-tree/arm64-libc/elf/librtld.os
> |  /usr/bin/ld: BFD (GNU Binutils for Debian) 2.29.90.20180122 assertion fail ../../bfd/elfnn-aarch64.c:4386
> |  /usr/bin/ld: BFD (GNU Binutils for Debian) 2.29.90.20180122 assertion fail ../../bfd/elfnn-aarch64.c:4386
> 
> ...
> 
> Given that binutils 2.30 should be released in the next few days, I
> believe we should fix that in at least the 2.26 stable branch. Do you
> mind if I backport this patch to this stable branch?
> 

Matthias Klose already pointed out this same issues when he tried to
bootstrap Ubuntu last week.  Please backport is to 2.26.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [GLIBC][AARCH64]Rewrite elf_machine_load_address using _DYNAMIC symbol
  2018-01-01  0:00       ` [GLIBC][AARCH64]Rewrite elf_machine_load_address using _DYNAMIC symbol Aurelien Jarno
  2018-01-01  0:00         ` Adhemerval Zanella
@ 2018-01-01  0:00         ` Szabolcs Nagy
  1 sibling, 0 replies; 3+ messages in thread
From: Szabolcs Nagy @ 2018-01-01  0:00 UTC (permalink / raw)
  To: Aurelien Jarno, Renlin Li; +Cc: nd, libc-stable

On 25/01/18 21:11, Aurelien Jarno wrote:
> 
> Given that binutils 2.30 should be released in the next few days, I
> believe we should fix that in at least the 2.26 stable branch. Do you
> mind if I backport this patch to this stable branch?
> 

this patch is ok to backport, should not have any bad
side effect.

(the patch does not work if ld.so is linked with
binutils 2.23 or older, but it seems glibc 2.26
requires at least binutils 2.25)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [GLIBC][AARCH64]Rewrite elf_machine_load_address using _DYNAMIC symbol
       [not found]     ` <59E72DA9.2090404@foss.arm.com>
@ 2018-01-01  0:00       ` Aurelien Jarno
  2018-01-01  0:00         ` Adhemerval Zanella
  2018-01-01  0:00         ` Szabolcs Nagy
  0 siblings, 2 replies; 3+ messages in thread
From: Aurelien Jarno @ 2018-01-01  0:00 UTC (permalink / raw)
  To: Renlin Li; +Cc: Szabolcs Nagy, libc-stable

Hi,

On 2017-10-18 11:32, Renlin Li wrote:
> Hi Szabolcs,
> 
> Here is the C version one which should be portable in all cases.
> aarch64 native glibc regression test checked Okay.
> 
> Regards,
> Renlin
> 
> ChangeLog:
> 
> 2017-10-18  Renlin Li  <renlin.li@arm.com>
> 
> 	* sysdeps/aarch64/dl-machine.h (elf_machine_load_address): Use
> 	_DYNAMIC symbol to calculate load address.
> 

I do not know the exact reason of this patch, but my guess is that its
goal is to fix building with recent binutils version. Indeed with a
recent snapshot of the binutils 2.30 branch, glibc versions withtout
this patch fail to build on aarch64 during the linking of ld.so:

...

|  aarch64-linux-gnu-gcc-7 -no-pie -fno-PIE   -nostdlib -nostartfiles -shared -o /home/aurel32/glibc-2.26/build-tree/arm64-libc/elf/ld.so.new              \
|            -Wl,-z,combreloc -Wl,-z,relro -Wl,--hash-style=both -Wl,-z,defs       \
|            /home/aurel32/glibc-2.26/build-tree/arm64-libc/elf/librtld.os -Wl,--version-script=/home/aurel32/glibc-2.26/build-tree/arm64-libc/ld.map              \
|            -Wl,-soname=ld-linux-aarch64.so.1                     \
|            -Wl,-defsym=_begin=0
|  /usr/bin/ld: /home/aurel32/glibc-2.26/build-tree/arm64-libc/elf/librtld.os: relocation R_AARCH64_ABS32 against `a local symbol' can not be used when making a shared object
|  /usr/bin/ld: BFD (GNU Binutils for Debian) 2.29.90.20180122 assertion fail ../../bfd/elfnn-aarch64.c:4386
|  /usr/bin/ld: BFD (GNU Binutils for Debian) 2.29.90.20180122 assertion fail ../../bfd/elfnn-aarch64.c:4386
|  /home/aurel32/glibc-2.26/build-tree/arm64-libc/elf/librtld.os: In function `process_envvars':
|  /home/aurel32/glibc-2.26/elf/rtld.c:2499:(.text+0x108c): relocation truncated to fit: R_AARCH64_LD64_GOT_LO12_NC against symbol `audit_list_string' defined in COMMON section in /home/aurel32/glibc-2.26/build-tree/arm64-libc/elf/librtld.os
|  /usr/bin/ld: BFD (GNU Binutils for Debian) 2.29.90.20180122 assertion fail ../../bfd/elfnn-aarch64.c:4386
|  /usr/bin/ld: BFD (GNU Binutils for Debian) 2.29.90.20180122 assertion fail ../../bfd/elfnn-aarch64.c:4386

...

Given that binutils 2.30 should be released in the next few days, I
believe we should fix that in at least the 2.26 stable branch. Do you
mind if I backport this patch to this stable branch?

Thanks,
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-26 10:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <581C57FF.2090901@foss.arm.com>
     [not found] ` <59E624A8.4010304@arm.com>
     [not found]   ` <59E62FBB.2090508@arm.com>
     [not found]     ` <59E72DA9.2090404@foss.arm.com>
2018-01-01  0:00       ` [GLIBC][AARCH64]Rewrite elf_machine_load_address using _DYNAMIC symbol Aurelien Jarno
2018-01-01  0:00         ` Adhemerval Zanella
2018-01-01  0:00         ` Szabolcs Nagy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).