Our symbol representation was redundant, and some times would get out of sync. It had an Elf_Sym, but some fields were copied to SymbolBody. Different parts of the code were checking the bits in SymbolBody and others were checking Elf_Sym. There are two general approaches to fix this: * Copy the required information and don't store and Elf_Sym. * Don't copy the information and always use the Elf_Smy. The second way sounds tempting, but has a big problem: we would have to template SymbolBody. I started doing it, but it requires templeting *everything* and creates a bit chicken and egg problem at the driver where we have to find ELFT before we can create an ArchiveFile for example. As much as possible I compared the test differences with what gold and bfd produce to make sure they are still valid. In most cases we are just adding hidden visibility to a local symbol, which is harmless. In most tests this is a small speedup. The only slowdown was scylla (1.006X). The largest speedup was clang with no --build-id, -O3 or --gc-sections (i.e.: focus on the relocations): 1.019X. llvm-svn: 265293
10 lines
286 B
ArmAsm
10 lines
286 B
ArmAsm
// RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t
|
|
// RUN: ld.lld -shared %t -o %t2
|
|
// RUN: llvm-readobj -t %t2 | FileCheck %s
|
|
.long _GLOBAL_OFFSET_TABLE_
|
|
|
|
// CHECK: Name: _GLOBAL_OFFSET_TABLE_
|
|
// CHECK-NEXT: Value:
|
|
// CHECK-NEXT: Size: 0
|
|
// CHECK-NEXT: Binding: Local
|