Allow copy relocations with pie links
Sriraman Tallam
tmsriram@google.com
Thu May 8 20:57:00 GMT 2014
On Thu, May 8, 2014 at 12:58 PM, Cary Coutant <ccoutant@google.com> wrote:
>> x86 doesn't have PC-relative data access. x86 needs
>> to use GOT for all data access in PIE unless run-time
>> text relocation is allowed. Normally x86 shouldn't have
>> copy relocation in PIE.
>
> Right. With Sri's test case, we get an absolute R_386_32 relocation
> for the access, and the DT_TEXTREL flag is set in the PIE binary
> because of the text relocation. There is no COPY relocation. Since we
> had a path in the code to check for copy relocs for the PC-relative
> relocations, I think it makes sense to adjust the test there, though.
It took me a while to understand this discussion. I think I get it
now, it looks like there is no need for me to change i386.cc as no
data access can produce a pc relative relocation. Cary, how do I
think I should adjust the test? The test itself passes on i386 even
without the change.
Thanks
Sri
>
> -cary
More information about the Binutils
mailing list