[llvm-bugs] [Bug 33649] New: remove appending linkage

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jun 29 17:26:48 PDT 2017


            Bug ID: 33649
           Summary: remove appending linkage
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Core LLVM classes
          Assignee: unassignedbugs at nondot.org
          Reporter: rafael.espindola at gmail.com
                CC: llvm-bugs at lists.llvm.org, tejohnson at google.com

The odd ways we have to handle appending linkage surfaced again in how
@llvm.global_ctors is handled.

I think we can make llvm linking simpler by removing the appending linkage.

Things like

 @llvm.global_ctors = ... { i32 A1, i32 B1, i8* C1 }, { i32 A2, i32 B2, i8* C2

can be represented as

@ctor1 = private ... { i32 A1, i32 B1 }, section
"llvm.metadata.ctors", comdat $(comdat of C1).
@ctor2 = private ... { i32 A2, i32 B2 }, section
"llvm.metadata.ctors", comdat $(comdat of C2).

Which has a few advantages:

* It links just like every other IR.
* It representation matches what is actually done in the object file.
Currently the representation has different meaning if C is not in a

Note that this still abstracts away the actual sections used by COFF/ELF/MachO.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170630/255225da/attachment.html>

More information about the llvm-bugs mailing list