This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Why is _dl_relocate_static_pie linked into crt1.o?
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 5 Jul 2018 05:01:35 -0700
- Subject: Re: Why is _dl_relocate_static_pie linked into crt1.o?
- References: <bde68f5a-580f-0609-124e-8b3f29b429a1@redhat.com>
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.