[llvm-dev] LLD doesn't handle globals with appending linkage

Fangrui Song via llvm-dev llvm-dev at lists.llvm.org
Tue Feb 18 10:18:33 PST 2020


On 2020-02-18, Gleb Popov via llvm-dev wrote:
>On Tue, Feb 18, 2020 at 9:42 PM David Blaikie <dblaikie at gmail.com> wrote:
>
>> I'm /guessing/ this might be related to the COFF support specifically
>> (perhaps COFF has no appending linkage support - in some cases LLVM IR
>> supports the union of all semantics so that different formats can be fully
>> expressed - but it means when targeting certain formats, some features are
>> inherently unusable because they don't map to anything on that platform)
>>
>
>Actually, I experience the same problem with ELF on FreeBSD.

https://llvm.org/docs/LangRef.html

> Unfortunately this doesn’t correspond to any feature in .o files, so
> it can only be used for variables like llvm.global_ctors which llvm
> interprets specially.

I think appending can only be used by llvm.used llvm.compiler.used
llvm.global_ctors llvm.global_dtors. How did you end up with an
appending in the IR?

(Maybe we can add an verifier because it seems no object format supports it.)


More information about the llvm-dev mailing list