bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/31795] ld.bfd makes ELFs of type ET_EXEC for static PIEs when lo


From: mintsuki at protonmail dot com
Subject: [Bug ld/31795] ld.bfd makes ELFs of type ET_EXEC for static PIEs when load address is non-0
Date: Sat, 25 May 2024 14:05:40 +0000

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

--- Comment #12 from mintsuki <mintsuki at protonmail dot com> ---
(In reply to H.J. Lu from comment #11)
> (In reply to mintsuki from comment #10)
> 
> > If this is policy, then I believe it should be properly documented
> 
> Updating document won't solve your debugging issue.  Why does GDB have
> no issues with PIE in user space?

I do not have a debugging issue, I am merely asking why ld.bfd is refusing to
generate static PIEs with type ET_DYN when the base address is non-0, while all
the other linkers generate them fine.

If the solution is to just never do that, I can easily instead generate a
shared object instead of a PIE, with a non-0 base, as that is accepted by
ld.bfd just fine, and by lld and gold.

Why doesn't ld.bfd allow generating a PIE with a non-0 base when lld and gold
allow that?

Why is it not possible to change ld.bfd's behaviour to match lld and gold?

Where in the ELF spec and/or binutils documentation is it explained that PIE
ELFs should only ever have a 0 load address? Why this?

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]