[ELF] SymbolTable::insert: keep @@ in the name
authorFangrui Song <i@maskray.me>
Wed, 15 Dec 2021 23:19:35 +0000 (15:19 -0800)
committerFangrui Song <i@maskray.me>
Wed, 15 Dec 2021 23:19:35 +0000 (15:19 -0800)
commit2bdad16303f4f0d716ebc2c12beb24ea50649639
treecd463295bea29730c5772d670a21b87c34e378dd
parent63a565768e8fdbb3260a88f584aa2c11a58fea93
[ELF] SymbolTable::insert: keep @@ in the name

* Avoid the name truncation quirk in SymbolTable::insert: the truncated name will be replaced by @@ again.
* Allow foo and foo@@v1 in different files to be diagnosed as duplicate definition error (GNU ld behavior)
* Avoid potential redundant strlen on symbol name due to StringRefZ in ObjFile<ELFT>::initializeSymbols
lld/ELF/InputFiles.cpp
lld/ELF/SymbolTable.cpp
lld/ELF/Symbols.cpp
lld/test/ELF/symver-archive.s