Files
clang-p2996/lld/test/ELF/Inputs/copy-rel-version.s
Fangrui Song 2389a240d0 [ELF] Fix copy relocation when two symbols share the same Symbol instance.
In glibc libc.so.6, the multiple versions of sys_errlist share the same Symbol instance. When sys_errlist is copy relocated, we would replace SharedSymbol with Defined in the first iteration of the following loop:

  for (SharedSymbol *Sym : getSymbolsAt<ELFT>(SS))

Then in the second iteration, we think the symbol (which has been changed to Defined) is still SharedSymbol and screw up (the address ends up in the `Size` field).

llvm-svn: 334432
2018-06-11 19:42:57 +00:00

12 lines
146 B
ArmAsm

.data
.global foo@v1
.type foo@v1, @object
.size foo@v1, 4
.global foo@@v2
.type foo@@v2, @object
.size foo@@v2, 8
foo@v1:
foo@@v2:
.int 0
.int 0