[lld] r246577 - Start recording st_other (i.e. visibility).
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 12:42:38 PDT 2015
Author: rafael
Date: Tue Sep 1 14:42:38 2015
New Revision: 246577
URL: http://llvm.org/viewvc/llvm-project?rev=246577&view=rev
Log:
Start recording st_other (i.e. visibility).
Modified:
lld/trunk/ELF/Writer.cpp
lld/trunk/test/elf2/symbols.s
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=246577&r1=246576&r2=246577&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Sep 1 14:42:38 2015
@@ -330,6 +330,7 @@ template <class ELFT> void SymbolTableSe
uint8_t Binding = InputSym->getBinding();
ESym->setBindingAndType(Binding, Type);
ESym->st_size = InputSym->st_size;
+ ESym->st_other = InputSym->st_other;
if (InputSym->isAbsolute()) {
ESym->st_shndx = SHN_ABS;
ESym->st_value = InputSym->st_value;
Modified: lld/trunk/test/elf2/symbols.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/symbols.s?rev=246577&r1=246576&r2=246577&view=diff
==============================================================================
--- lld/trunk/test/elf2/symbols.s (original)
+++ lld/trunk/test/elf2/symbols.s Tue Sep 1 14:42:38 2015
@@ -33,6 +33,10 @@ abs = 0x123
.comm common,4,4
+.global protected
+.protected protected
+protected:
+
// CHECK: Name: .text
// CHECK-NEXT: Type: SHT_PROGBITS
// CHECK-NEXT: Flags [
@@ -123,6 +127,15 @@ abs = 0x123
// CHECK-NEXT: Section: foobar
// CHECK-NEXT: }
// CHECK-NEXT: Symbol {
+// CHECK-NEXT: Name: protected
+// CHECK-NEXT: Value: 0x1010
+// CHECK-NEXT: Size: 0
+// CHECK-NEXT: Binding: Global
+// CHECK-NEXT: Type: None
+// CHECK-NEXT: Other: 3
+// CHECK-NEXT: Section: foobar
+// CHECK-NEXT: }
+// CHECK-NEXT: Symbol {
// CHECK-NEXT: Name: zed3
// CHECK-NEXT: Value: 0x1010
// CHECK-NEXT: Size: 4
More information about the llvm-commits
mailing list