This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [GLIBC][AARCH64]Rewrite elf_machine_load_address using _DYNAMIC symbol
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Szabolcs Nagy <szabolcs dot nagy at arm dot com>
- Cc: Renlin Li <renlin dot li at foss dot arm dot com>, <nd at arm dot com>, <libc-alpha at sourceware dot org>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>, Richard Earnshaw <Richard dot Earnshaw at arm dot com>
- Date: Tue, 8 Nov 2016 13:28:29 -0800 (PST)
- Subject: Re: [GLIBC][AARCH64]Rewrite elf_machine_load_address using _DYNAMIC symbol
- Authentication-results: sourceware.org; auth=none
- References: <581C57FF.2090901@foss.arm.com> <20161104212440.A23F42C3AD8@topped-with-meat.com> <58209A8B.5030702@arm.com>
There is plenty more reliance on the compiler not doing the wrong things.
I don't see any new issue there.
The use of a linker script here also does not concern me. This only
affects building ld.so itself, so there is no issue about general linker
compatibility. We have plenty more use of fancy linker features and only a
few linkers are capable of building libc already.
I never said I was sure this technique works on all machines.
It certainly works on aarch64.
Show me the code you have in mind using _DYNAMIC. The scheme using a
linker-defined symbol with value 0 is the only one I'm aware of that
reduces to the minimal number of assembly instructions, with none of them
being a load.