Randomize offset between program segments?

Topi Miettinen toiwoton@gmail.com
Wed Oct 21 09:34:23 GMT 2020


On 21.10.2020 12.14, Siddhesh Poyarekar wrote:
> On 10/21/20 1:10 PM, Topi Miettinen wrote:
>> Sorry, I forgot to mention that the code is also compiled with "-fPIC
>> -pie", so PC-relative accesses will be always used.
> 
> PC-relative accesses will work only if the offset between the code and
> data is known at link time.  It implies that it is fixed at runtime,
> which won't work for your use case since you want it to be dynamic.

Why can't the dynamic linker calculate the offset?

-Topi


More information about the Libc-alpha mailing list