[llvm-bugs] [Bug 36623] New: llvm doesn't handle @@@ in symbol names at lto time

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 6 18:03:55 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=36623

            Bug ID: 36623
           Summary: llvm doesn't handle @@@ in symbol names at lto time
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: rafael at espindo.la
                CC: llvm-bugs at lists.llvm.org, peter at pcc.me.uk,
                    tejohnson at google.com

Given

$ cat test.ll
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

module asm ".global foo"
module asm "foo:"
module asm ".symver foo,foo@@@VER1"

llc produces a file with:

0000000000000000 T foo@@VER1

But running llvm-nm on the bitcode shows

---------------- T foo
---------------- T foo@@@VER1

So it looks like we are missing a special case for @@@ in the asm parsing we do
for creating bitcode symbol tables.

This results in LTO failures. Given a test.ver with "VER1 {};", we get:

$ ld.lld -shared test.o -o t.so --version-script test.ver
(no errors)

but

$ ld.lld: error: duplicate symbol: foo@@@VER1
>>> defined in test.bc
>>> defined in test.bc

-- 
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/20180307/cf545dd2/attachment.html>


More information about the llvm-bugs mailing list