This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Why is _dl_relocate_static_pie linked into crt1.o?
- From: Florian Weimer <fweimer at redhat dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 5 Jul 2018 13:51:45 +0200
- Subject: Why is _dl_relocate_static_pie linked into crt1.o?
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?
Thanks,
Florian