This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [GLIBC][AARCH64]Rewrite elf_machine_load_address using _DYNAMIC symbol


> On 08/11/16 21:28, Roland McGrath wrote:
> > 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.
> 
> well the current x86_64 code is already doing what i had in mind.

And it is more costly than using _BASE.

> i assumed GOT[0] is used elsewhere so it has to be computed anyway
> and then doing (_DYNAMIC-GOT[0]) should be the same as _BASE using
> an extra sub.

Of course all the methods that work get the same result!
The point is that the _BASE method does it the most efficiently.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]