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


$ 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 --version-script test.ver
(no errors)


$ 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.
llvm-bugs mailing list

Reply via email to