Why is _dl_relocate_static_pie linked into crt1.o?
H.J. Lu
hjl.tools@gmail.com
Thu Jul 5 12:01:00 GMT 2018
On Thu, Jul 5, 2018 at 4:51 AM, Florian Weimer <fweimer@redhat.com> wrote:
> I see this:
>
> “
> $ objdump -d --reloc /usr/lib64/crt1.o
>
> /usr/lib64/crt1.o: file format elf64-x86-64
>
>
> Disassembly of section .text:
>
> 0000000000000000 <_start>:
> 0: 31 ed xor %ebp,%ebp
> 2: 49 89 d1 mov %rdx,%r9
> 5: 5e pop %rsi
> 6: 48 89 e2 mov %rsp,%rdx
> 9: 48 83 e4 f0 and $0xfffffffffffffff0,%rsp
> …
>
> 0000000000000030 <_dl_relocate_static_pie>:
> 30: c3 retq
> ”
>
> Isn't _dl_relocate_static_pie useless there? It will not be used in
> dynamically linked binaries. Should it be included in libc_nonshared.a
> instead, so that static PIE binaries pick it up, as needed?
>
This dummy function is provided for arm. Can we find a way to define
it only for arm?
--
H.J.
More information about the Libc-alpha
mailing list