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: Why is _dl_relocate_static_pie linked into crt1.o?


On 07/05/2018 02:09 PM, Andreas Schwab wrote:
On Jul 05 2018, Florian Weimer <fweimer@redhat.com> wrote:

I see this:

“
$ objdump -d --reloc /usr/lib64/crt1.o

crt1.o is only used by non-PIE executables, isn't it?

Yes, _start does not even perform the required relocations.

I assume the intent here is that other code can be shared between PIE and non-PIE executables. However, it's not clear to me why the symbol _dl_relocate_static_pie has to be used in the address calculation. If there's another symbol which is present in shared and static-PIE builds alike, wouldn't that avoid the need for defining _dl_relocate_static_pie in shared builds?

Thanks,
Florian


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