[lld] r271950 - Ignore the "globally available" version.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 6 15:42:57 PDT 2016
Author: rafael
Date: Mon Jun 6 17:42:57 2016
New Revision: 271950
URL: http://llvm.org/viewvc/llvm-project?rev=271950&view=rev
Log:
Ignore the "globally available" version.
Reduced from a firefox build.
Added:
lld/trunk/test/ELF/Inputs/version-use.script
lld/trunk/test/ELF/Inputs/version-use.so (with props)
lld/trunk/test/ELF/version-use.s
Modified:
lld/trunk/ELF/InputFiles.cpp
Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=271950&r1=271949&r2=271950&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Mon Jun 6 17:42:57 2016
@@ -527,7 +527,7 @@ template <class ELFT> void SharedFile<EL
if (Versym) {
// Ignore local symbols and non-default versions.
- if (VersymIndex == 0 || (VersymIndex & VERSYM_HIDDEN))
+ if (VersymIndex == 0 || VersymIndex == 1 || (VersymIndex & VERSYM_HIDDEN))
continue;
}
elf::Symtab<ELFT>::X->addShared(this, Name, Sym, Verdefs[VersymIndex]);
Added: lld/trunk/test/ELF/Inputs/version-use.script
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/version-use.script?rev=271950&view=auto
==============================================================================
--- lld/trunk/test/ELF/Inputs/version-use.script (added)
+++ lld/trunk/test/ELF/Inputs/version-use.script Mon Jun 6 17:42:57 2016
@@ -0,0 +1,6 @@
+ABC {
+global:
+foo;
+local:
+*;
+};
Added: lld/trunk/test/ELF/Inputs/version-use.so
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/Inputs/version-use.so?rev=271950&view=auto
==============================================================================
Binary files lld/trunk/test/ELF/Inputs/version-use.so (added) and lld/trunk/test/ELF/Inputs/version-use.so Mon Jun 6 17:42:57 2016 differ
Propchange: lld/trunk/test/ELF/Inputs/version-use.so
------------------------------------------------------------------------------
svn:executable = *
Added: lld/trunk/test/ELF/version-use.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/version-use.s?rev=271950&view=auto
==============================================================================
--- lld/trunk/test/ELF/version-use.s (added)
+++ lld/trunk/test/ELF/version-use.s Mon Jun 6 17:42:57 2016
@@ -0,0 +1,9 @@
+// REQUIRES: x86
+// RUN: llvm-mc %s -o %t.o -filetype=obj -triple=x86_64-pc-linux
+// RUN: ld.lld %t.o %p/Inputs/version-use.so -o %t.so -shared
+// RUN: llvm-readobj -s %t.so | FileCheck %s
+
+
+ call bar at PLT
+
+// CHECK-NOT: SHT_GNU_versym
More information about the llvm-commits
mailing list