entries in PT_DYNAMIC section refer to the correct address at runtime?

Alan Modra amodra@gmail.com
Fri Sep 15 07:26:00 GMT 2017

On Fri, Sep 15, 2017 at 02:57:36PM +0800, Yubin Ruan wrote:
> 2017-09-14 18:25 GMT+08:00 Alan Modra <amodra@gmail.com>:
> > DT_ entries that specify addresses will need to be offset by the base
> > address.
> Will base address be automatically adjusted by the dynamic linker if
> it tries to loaded it at a different base address than that specified
> in the `p_vaddr'?

That might depend on the dynamic linker.  glibc ld.so doesn't as far
as I know.  Build yourself a testcase and inspect the .dynamic section
of a shared library or PIE under gdb.

Alan Modra
Australia Development Lab, IBM

More information about the Elfutils-devel mailing list