diff options
-rw-r--r-- | lld/ELF/InputFiles.cpp | 4 | ||||
-rw-r--r-- | lld/test/ELF/corrupted-version-reference.s | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp index a0a38de0d8a..cf3672c60b9 100644 --- a/lld/ELF/InputFiles.cpp +++ b/lld/ELF/InputFiles.cpp @@ -780,9 +780,7 @@ template <class ELFT> void SharedFile<ELFT>::parseRest() { if (VersymIndex >= Verdefs.size()) { error("corrupt input file: version definition index " + Twine(VersymIndex) + " for symbol " + Name + - " is greater than the maximum value " + - Twine(Verdefs.size() - 1) + "\n>>> symbol is defined in " + - toString(this)); + " is out of bounds\n>>> defined in " + toString(this)); continue; } V = Verdefs[VersymIndex]; diff --git a/lld/test/ELF/corrupted-version-reference.s b/lld/test/ELF/corrupted-version-reference.s index 15fbbeeaa14..ce027c27f48 100644 --- a/lld/test/ELF/corrupted-version-reference.s +++ b/lld/test/ELF/corrupted-version-reference.s @@ -1,8 +1,8 @@ # RUN: llvm-mc -triple=mips64-unknown-freebsd %s -filetype=obj -o %t.o # RUN: not ld.lld %t.o %S/Inputs/corrupt-version-reference.so -o %t.exe 2>&1 | FileCheck %s -# CHECK: error: corrupt input file: version definition index 9 for symbol __cxa_finalize is greater than the maximum value 8 -# CHECK: >>> symbol is defined in {{.+}}/corrupt-version-reference.so +# CHECK: error: corrupt input file: version definition index 9 for symbol __cxa_finalize is out of bounds +# CHECK: >>> defined in {{.+}}/corrupt-version-reference.so .globl __start __start: |