https://sourceware.org/bugzilla/show_bug.cgi?id=31795

--- Comment #35 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to mintsuki from comment #34)

> > The static PIE generated by ldd with non-zero load address won't work with
> > glibc before and after my glibc fix.  I will open an lld issue after glibc
> > is fixed.
> 
> I *strongly* disagree with this.
> 
> Why are glibc implementation details dictating how ld.bfd operates? Where

This is how ELF works on Linux.

> does it say non-0 load addresses for static-PIE/PIE are not allowed in the
> ELF specification? If it is allowed, why is ld.bfd not allowing me to do it

Static PIE isn't the part of ELF spec. There was a discussion:

https://groups.google.com/g/generic-abi/c/mBKlSNldFW4/m/GRddmWGGBQAJ

> despite Limine accepting this form of ELF files just fine?
> 
> At least please consider adding a flag or linker script directive to
> manually set the ELF type...

That will generate the wrong static PIE with non-zero load address.  You should
check DF_1_PIE for PIE, not ET_DYN.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to