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: hjl.tools at gmail 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 13:07:07 +0000

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

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to mintsuki from comment #2)
> (In reply to H.J. Lu from comment #1)
> > It is done to ensure that PIE is loaded at the specific address which may
> > be required for functional, performance or security purposes.
> 
> This does not match what all the other major linkers do (LLD, gold). It also
> isn't properly documented anywhere that I could find. Additionally, why
> would someone generate a PIE just for it to be loaded *always* at the same
> specified address? What is the use case?

A program may work properly only when it is loaded above 4GB address.

> From what I know, if a PIE has a specific non-0 load address, it should be
> taken as a hint or preferred load address, but then the program loader
> should be able to apply any slide to it as it sees fit.

If a PIE doesn't care where to load, set the load address to 0.

-- 
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]