[lld] r272303 - Also reject 32 bit dynamic relocs when producing executable.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 9 17:03:02 PDT 2016


On 9 June 2016 at 17:45, Joerg Sonnenberger <joerg at bec.de> wrote:
> On Thu, Jun 09, 2016 at 08:35:28PM -0000, Rafael Espindola via llvm-commits wrote:
>> Author: rafael
>> Date: Thu Jun  9 15:35:27 2016
>> New Revision: 272303
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=272303&view=rev
>> Log:
>> Also reject 32 bit dynamic relocs when producing executable.
>>
>> They point to a shared library, so they would still overflow at runtime.
>
> Shouldn't those get a copy relocation or stub by default?

It should be possible. To my knowledge no linker does it so far.

If anyone wants to implement it, I think we need a another target
hook: hasCorrespondingDynamicReloc. If that returns false and we are
creating an executable we can create a copy relocation instead.

Cheers,
Rafael


More information about the llvm-commits mailing list