[LLVMbugs] [Bug 22303] New: lld gets confused with STB_GNU_UNIQUE (gcc produced file)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 22 20:51:37 PST 2015


            Bug ID: 22303
           Summary: lld gets confused with STB_GNU_UNIQUE (gcc produced
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: rafael.espindola at gmail.com
                CC: llvmbugs at cs.uiuc.edu, ruiu at google.com
    Classification: Unclassified

Found while trying to link a gcc compiled lld with lld.

$ cat test.s
        .section abc,"G", at progbits,foo,comdat
        .type   bar, @gnu_unique_object
        .long   42
[$ llvm-mc test.s -o test.o -filetype=obj
$ ld test.o test.o -o test.so -shared
$ lld -flavor gnu test.o test.o -o test.so -shared
Duplicate symbols: bar:test.o and bar:test.o
LLVM ERROR: duplicate symbol error

Which is odd, since we have a comdat, so I would expect lld to discard it when
it finds the comdat a second time.

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/20150123/d620f146/attachment.html>

More information about the llvm-bugs mailing list