[ELF] -r: don't parse @ (symbol versioning) for .symver inline asm in bitcode
authorFangrui Song <maskray@google.com>
Wed, 24 Jun 2020 15:22:17 +0000 (08:22 -0700)
committerFangrui Song <maskray@google.com>
Wed, 24 Jun 2020 15:22:22 +0000 (08:22 -0700)
commit4542c18ef295702b269204f83352b673c59e6542
treea8fa357479bdf16a0479d09b415cb744409845d4
parent778351df777b89641cadf038b17e416b0bbf31ab
[ELF] -r: don't parse @ (symbol versioning) for .symver inline asm in bitcode

Fixes PR46420
Similar to D43307 for non-LTO.

Module-level inline assembly can use .symver to create a symbol with `@` in the name.
For relocatable output, @ should be retained in the symbol name. `@ver` should
not be parsed and dropped.

Reviewed By: grimar, psmith

Differential Revision: https://reviews.llvm.org/D82433
lld/ELF/Driver.cpp
lld/test/ELF/lto/version-script2.ll