[lld] r248381 - Don't complain about symbols showing up in multible shared libraries.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 23 07:24:02 PDT 2015


Author: rafael
Date: Wed Sep 23 09:23:59 2015
New Revision: 248381

URL: http://llvm.org/viewvc/llvm-project?rev=248381&view=rev
Log:
Don't complain about symbols showing up in multible shared libraries.

Modified:
    lld/trunk/ELF/Symbols.cpp
    lld/trunk/test/elf2/shared.s

Modified: lld/trunk/ELF/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=248381&r1=248380&r2=248381&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.cpp (original)
+++ lld/trunk/ELF/Symbols.cpp Wed Sep 23 09:23:59 2015
@@ -52,6 +52,10 @@ template <class ELFT> int SymbolBody::co
     return -1;
   if (!L.first || !L.second)
     return 1;
+  if (isShared())
+    return -1;
+  if (Other->isShared())
+    return 1;
   if (isCommon()) {
     if (!Other->isCommon())
       return -1;

Modified: lld/trunk/test/elf2/shared.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf2/shared.s?rev=248381&r1=248380&r2=248381&view=diff
==============================================================================
--- lld/trunk/test/elf2/shared.s (original)
+++ lld/trunk/test/elf2/shared.s Wed Sep 23 09:23:59 2015
@@ -4,7 +4,7 @@
 // RUN: llvm-readobj -s %t2.so | FileCheck --check-prefix=SO %s
 // RUN: lld -flavor gnu2 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -rpath foo -rpath bar --export-dynamic %t.o %t2.so -o %t
 // RUN: llvm-readobj --program-headers --dynamic-table -t -s -dyn-symbols -section-data -hash-table %t | FileCheck %s
-// RUN: lld -flavor gnu2 %t.o %t2.so -o %t2
+// RUN: lld -flavor gnu2 %t.o %t2.so %t2.so -o %t2
 // RUN: llvm-readobj -dyn-symbols %t2 | FileCheck --check-prefix=DONT_EXPORT %s
 // REQUIRES: x86
 




More information about the llvm-commits mailing list