[PATCH] csu: Skip ARCH_SETUP_IREL if _dl_relocate_static_pie applied IRELATIVE relocations [BZ #27164]

H.J. Lu hjl.tools@gmail.com
Tue Jul 13 23:20:34 GMT 2021


On Tue, Jul 13, 2021 at 4:07 PM Fangrui Song via Libc-alpha
<libc-alpha@sourceware.org> wrote:
>
> On 2021-07-13, Siddhesh Poyarekar wrote:
> >On 7/13/21 1:36 PM, Fangrui Song via Libc-alpha wrote:
> >>A toolchain project can do some workaround for a libc if this choice
> >>makes a large community happy. However, I think it is important not to
> >>take it granted. It is inadequate to just dismiss toolchain developers'
> >>reasonable complaints. The libc should actively fix the issues so that
> >>the toolchain will not need to bear unneeded code in the future.
> >>
> >>I actually have contributed quite a few lld/ELF patches to work around
> >>glibc. For this one I just feel it is not right to just patch lld/ELF
> >>without fixing glibc.
> >
> >What's the utility of having the __rela_iplt{_start,_end} symbols in
> >all binaries other than, maybe, simplifying the static linker
> >implementation?  How does it improve things for the generated
> >application code in the end?  AFAICT it is doing the opposite by
> >requiring application startup to add a conditional to work around the
> >presence of a redundant symbol.
> >
> >Siddhesh
>
> Please see the sentence from the first message
> "In addition, this enables a future simplification to GNU ld: we can
> drop a linker script difference between -no-pie and -pie."

Did you mean non-PIE static and PIE static?  Neither PIE nor PDE
define __rela_iplt{_start,_end}.

> This is the only difference other than image base difference.

There are many differences between non-PIE static and PIE static.
Non-PIE static doesn't have DT_XXX sections.


-- 
H.J.


More information about the Libc-alpha mailing list