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

Gleb Popov via llvm-dev llvm-dev at lists.llvm.org
Tue Feb 18 10:21:09 PST 2020


On Tue, Feb 18, 2020 at 10:19 PM Fangrui Song via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

>
> 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.)
>

But these bitcode files aren't linked to .o files yet, but into a single
bitcode file. It should be perfectly fine to have appending globals at this
stage.

_______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200218/ff23dcec/attachment.html>


More information about the llvm-dev mailing list