[lld] r295632 - Add more comments about copy relocations.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 09:19:04 PST 2017


Joerg Sonnenberger via llvm-commits <llvm-commits at lists.llvm.org>
writes:

> On Mon, Feb 20, 2017 at 06:16:08PM -0800, Rui Ueyama via llvm-commits wrote:
>> Are you suggesting I bring it up to the LLVM blog? This comment is my
>> opinion, and I guess not everybody agrees we should avoid exporting globals
>> from DSOs.
>
> Sadly, the accessor approach is expensive and often not a choice. A
> better way would be to provide an attribute to force GOT-based access
> even in non-PIC mode. We are slowly getting the necessary relocations on
> the modern platforms at least.

I have adding a -fno-copy-reloc to clang in my todo list. But a library
author should at least document that copy relocations are not guaranteed
to work after an upgrade.

Cheers,
Rafael


More information about the llvm-commits mailing list