[PATCH] D21781: [ELF] Warn for duplicate symbols in version scripts instead of erroring out
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 27 19:41:51 PDT 2016
davide created this revision.
davide added reviewers: grimar, rafael, ruiu.
davide added a subscriber: llvm-commits.
http://reviews.llvm.org/D21781
Files:
ELF/SymbolTable.cpp
test/ELF/version-script.s
Index: test/ELF/version-script.s
===================================================================
--- test/ELF/version-script.s
+++ test/ELF/version-script.s
@@ -53,9 +53,9 @@
# RUN: VERSION_2.0 { \
# RUN: global: foo1; \
# RUN: local: *; }; " > %t6.script
-# RUN: not ld.lld --version-script %t6.script -shared %t.o %t2.so -o %t6.so 2>&1 | \
-# RUN: FileCheck -check-prefix=ERR2 %s
-# ERR2: duplicate symbol foo1 in version script
+# RUN: ld.lld --version-script %t6.script -shared %t.o %t2.so -o %t6.so 2>&1 | \
+# RUN: FileCheck -check-prefix=WARN2 %s
+# WARN2: duplicate symbol foo1 in version script
# RUN: ld.lld --version-script %t.script --dynamic-list %t.list %t.o %t2.so -o %t2
# RUN: llvm-readobj %t2 > /dev/null
Index: ELF/SymbolTable.cpp
===================================================================
--- ELF/SymbolTable.cpp
+++ ELF/SymbolTable.cpp
@@ -534,7 +534,7 @@
if (SymbolBody *B = find(Name)) {
if (B->symbol()->VersionId != VER_NDX_GLOBAL &&
B->symbol()->VersionId != VER_NDX_LOCAL)
- error("duplicate symbol " + Name + " in version script");
+ warning("duplicate symbol " + Name + " in version script");
B->symbol()->VersionId = I;
}
++I;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21781.62051.patch
Type: text/x-patch
Size: 1276 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160628/e8f56189/attachment.bin>
More information about the llvm-commits
mailing list