summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-11-21 13:49:57 +0000
committerRui Ueyama <ruiu@google.com>2016-11-21 13:49:57 +0000
commite8785ba4d7fab0c537d381a1438dd82cb093d514 (patch)
treefc1fe24de6d1fb88be17e0c2d0316cb7983ddd7d
parent68dd881697531f45b0260cb3dba56804986c8fa6 (diff)
downloadbcm5719-llvm-e8785ba4d7fab0c537d381a1438dd82cb093d514.tar.gz
bcm5719-llvm-e8785ba4d7fab0c537d381a1438dd82cb093d514.zip
Change the way how we print out line numbers.
LLD's error messages contain line numbers, function names or section names. Currently they are formatter as follows. foo.c (32): symbol 'foo' not found foo.c (function bar): symbol 'foo' not found foo.c (.text+0x1234): symbol 'foo' not found This patch changes them so that they are consistent with Clang's output. foo.c:32: symbol 'foo' not found foo.c:(function bar): symbol 'foo' not found foo.c:(.text+0x1234): symbol 'foo' not found Differential Revision: https://reviews.llvm.org/D26901 llvm-svn: 287537
-rw-r--r--lld/ELF/InputFiles.cpp2
-rw-r--r--lld/ELF/Relocations.cpp4
-rw-r--r--lld/test/ELF/aarch64-fpic-add_abs_lo12_nc.s2
-rw-r--r--lld/test/ELF/aarch64-fpic-adr_prel_lo21.s2
-rw-r--r--lld/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s2
-rw-r--r--lld/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s2
-rw-r--r--lld/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s2
-rw-r--r--lld/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s2
-rw-r--r--lld/test/ELF/arm-target1.s2
-rw-r--r--lld/test/ELF/basic.s4
-rw-r--r--lld/test/ELF/conflict.s24
-rw-r--r--lld/test/ELF/copy-errors.s2
-rw-r--r--lld/test/ELF/copy-in-shared.s2
-rw-r--r--lld/test/ELF/copy-rel-pie-error.s4
-rw-r--r--lld/test/ELF/dynamic-reloc-in-ro.s2
-rw-r--r--lld/test/ELF/eh-frame-dyn-rel.s2
-rw-r--r--lld/test/ELF/libsearch.s2
-rw-r--r--lld/test/ELF/linkerscript/edata-etext.s6
-rw-r--r--lld/test/ELF/linkerscript/ehdr_start.s2
-rw-r--r--lld/test/ELF/lto/combined-lto-object-name.ll2
-rw-r--r--lld/test/ELF/relocation-relative-absolute.s2
-rw-r--r--lld/test/ELF/sysroot.s2
-rw-r--r--lld/test/ELF/tls-static.s2
-rw-r--r--lld/test/ELF/undef-shared.s6
-rw-r--r--lld/test/ELF/undef.s16
-rw-r--r--lld/test/ELF/unresolved-symbols.s4
-rw-r--r--lld/test/ELF/verneed-local.s2
-rw-r--r--lld/test/ELF/zdefs.s2
28 files changed, 54 insertions, 54 deletions
diff --git a/lld/ELF/InputFiles.cpp b/lld/ELF/InputFiles.cpp
index 72d8148dedf..ae16a630737 100644
--- a/lld/ELF/InputFiles.cpp
+++ b/lld/ELF/InputFiles.cpp
@@ -91,7 +91,7 @@ std::string elf::ObjectFile<ELFT>::getLineInfo(InputSectionBase<ELFT> *S,
Info);
if (Info.Line == 0)
return "";
- return Info.FileName + " (" + std::to_string(Info.Line) + ")";
+ return Info.FileName + ":" + std::to_string(Info.Line);
}
// Returns "(internal)", "foo.a(bar.o)" or "baz.o".
diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp
index 8bcf4d25d4e..d6bfe10adab 100644
--- a/lld/ELF/Relocations.cpp
+++ b/lld/ELF/Relocations.cpp
@@ -554,11 +554,11 @@ std::string getLocation(InputSectionBase<ELFT> &S, typename ELFT::uint Offset) {
DefinedRegular<ELFT> *Encl = getSymbolAt(&S, Offset);
if (Encl && Encl->Type == STT_FUNC) {
StringRef Func = getSymbolName(File->getStringTable(), *Encl);
- return SrcFile + " (function " + maybeDemangle(Func) + ")";
+ return SrcFile + ":(function " + maybeDemangle(Func) + ")";
}
// If there's no symbol, print out the offset instead of a symbol name.
- return (SrcFile + " (" + S.Name + "+0x" + Twine::utohexstr(Offset) + ")")
+ return (SrcFile + ":(" + S.Name + "+0x" + Twine::utohexstr(Offset) + ")")
.str();
}
diff --git a/lld/test/ELF/aarch64-fpic-add_abs_lo12_nc.s b/lld/test/ELF/aarch64-fpic-add_abs_lo12_nc.s
index 4757ed25b97..0ebd0fdde3a 100644
--- a/lld/test/ELF/aarch64-fpic-add_abs_lo12_nc.s
+++ b/lld/test/ELF/aarch64-fpic-add_abs_lo12_nc.s
@@ -1,7 +1,7 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
-// CHECK: {{.*}}.o (.text+0x0): can't create dynamic relocation R_AARCH64_ADD_ABS_LO12_NC against symbol 'dat' defined in {{.*}}.o
+// CHECK: {{.*}}.o:(.text+0x0): can't create dynamic relocation R_AARCH64_ADD_ABS_LO12_NC against symbol 'dat' defined in {{.*}}.o
add x0, x0, :lo12:dat
.data
diff --git a/lld/test/ELF/aarch64-fpic-adr_prel_lo21.s b/lld/test/ELF/aarch64-fpic-adr_prel_lo21.s
index fb51450fba9..d01749600e7 100644
--- a/lld/test/ELF/aarch64-fpic-adr_prel_lo21.s
+++ b/lld/test/ELF/aarch64-fpic-adr_prel_lo21.s
@@ -1,7 +1,7 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
-// CHECK: {{.*}}.o (.text+0x0): can't create dynamic relocation R_AARCH64_ADR_PREL_LO21 against symbol 'dat' defined in {{.*}}.o
+// CHECK: {{.*}}.o:(.text+0x0): can't create dynamic relocation R_AARCH64_ADR_PREL_LO21 against symbol 'dat' defined in {{.*}}.o
adr x0, dat
.data
diff --git a/lld/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s b/lld/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s
index 9ca1e6782e0..3da4b2ece51 100644
--- a/lld/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s
+++ b/lld/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s
@@ -1,7 +1,7 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
-// CHECK: {{.*}}.o (.text+0x0): can't create dynamic relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol 'dat' defined in {{.*}}.o
+// CHECK: {{.*}}.o:(.text+0x0): can't create dynamic relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol 'dat' defined in {{.*}}.o
adrp x0, dat
.data
diff --git a/lld/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s b/lld/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s
index fba314d87e4..8df582186b2 100644
--- a/lld/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s
+++ b/lld/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s
@@ -1,7 +1,7 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
-// CHECK: {{.*}}.o (.text+0x0): can't create dynamic relocation R_AARCH64_LDST32_ABS_LO12_NC against symbol 'dat' defined in {{.*}}.o
+// CHECK: {{.*}}.o:(.text+0x0): can't create dynamic relocation R_AARCH64_LDST32_ABS_LO12_NC against symbol 'dat' defined in {{.*}}.o
ldr s4, [x0, :lo12:dat]
.data
diff --git a/lld/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s b/lld/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s
index 8147398df73..fe80e654277 100644
--- a/lld/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s
+++ b/lld/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s
@@ -1,7 +1,7 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
-// CHECK: {{.*}}.o (.text+0x0): can't create dynamic relocation R_AARCH64_LDST64_ABS_LO12_NC against symbol 'dat' defined in {{.*}}.o
+// CHECK: {{.*}}.o:(.text+0x0): can't create dynamic relocation R_AARCH64_LDST64_ABS_LO12_NC against symbol 'dat' defined in {{.*}}.o
ldr x0, [x0, :lo12:dat]
.data
diff --git a/lld/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s b/lld/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s
index aa6d5a0d7d8..8442062bed9 100644
--- a/lld/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s
+++ b/lld/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s
@@ -1,7 +1,7 @@
// REQUIRES: aarch64
// RUN: llvm-mc -filetype=obj -triple=aarch64-none-freebsd %s -o %t.o
// RUN: not ld.lld -shared %t.o -o %t.so 2>&1 | FileCheck %s
-// CHECK: {{.*}}.o (.text+0x0): can't create dynamic relocation R_AARCH64_LDST8_ABS_LO12_NC against symbol 'dat' defined in {{.*}}.o
+// CHECK: {{.*}}.o:(.text+0x0): can't create dynamic relocation R_AARCH64_LDST8_ABS_LO12_NC against symbol 'dat' defined in {{.*}}.o
ldrsb x0, [x1, :lo12:dat]
.data
diff --git a/lld/test/ELF/arm-target1.s b/lld/test/ELF/arm-target1.s
index 8ad4089002d..b62d6d663a8 100644
--- a/lld/test/ELF/arm-target1.s
+++ b/lld/test/ELF/arm-target1.s
@@ -29,4 +29,4 @@
// RELATIVE: SYMBOL TABLE:
// RELATIVE: 00001004 .text 00000000 patatino
-// ABS: {{.*}}.o (.text+0x0): can't create dynamic relocation R_ARM_TARGET1 against symbol 'patatino' defined in {{.*}}.o
+// ABS: {{.*}}.o:(.text+0x0): can't create dynamic relocation R_ARM_TARGET1 against symbol 'patatino' defined in {{.*}}.o
diff --git a/lld/test/ELF/basic.s b/lld/test/ELF/basic.s
index 5c10d45d4cc..2ced3f2e7a7 100644
--- a/lld/test/ELF/basic.s
+++ b/lld/test/ELF/basic.s
@@ -237,8 +237,8 @@ _start:
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t
# RUN: not ld.lld %t %t -o %t2 2>&1 | FileCheck --check-prefix=DUP %s
-# DUP: {{.*}} (.text+0x0): duplicate symbol '_start'
-# DUP: {{.*}} (.text+0x0): previous definition was here
+# DUP: {{.*}}:(.text+0x0): duplicate symbol '_start'
+# DUP: {{.*}}:(.text+0x0): previous definition was here
# RUN: not ld.lld %t -o %t -m wrong_emul_fbsd 2>&1 | FileCheck --check-prefix=UNKNOWN_EMUL %s
# UNKNOWN_EMUL: unknown emulation: wrong_emul_fbsd
diff --git a/lld/test/ELF/conflict.s b/lld/test/ELF/conflict.s
index fde285dd781..b9bb50515c5 100644
--- a/lld/test/ELF/conflict.s
+++ b/lld/test/ELF/conflict.s
@@ -3,18 +3,18 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t1.o
# RUN: not ld.lld %t1.o %t1.o -o %t2 2>&1 | FileCheck -check-prefix=DEMANGLE %s
-# DEMANGLE: {{.*}} (.text+0x0): duplicate symbol 'mul(double, double)'
-# DEMANGLE-NEXT: {{.*}} (.text+0x0): previous definition was here
-# DEMANGLE-NEXT: {{.*}} (.text+0x0): duplicate symbol 'foo'
-# DEMANGLE-NEXT: {{.*}} (.text+0x0): previous definition was here
+# DEMANGLE: {{.*}}:(.text+0x0): duplicate symbol 'mul(double, double)'
+# DEMANGLE-NEXT: {{.*}}:(.text+0x0): previous definition was here
+# DEMANGLE-NEXT: {{.*}}:(.text+0x0): duplicate symbol 'foo'
+# DEMANGLE-NEXT: {{.*}}:(.text+0x0): previous definition was here
# RUN: not ld.lld %t1.o %t1.o -o %t2 --no-demangle 2>&1 | \
# RUN: FileCheck -check-prefix=NO_DEMANGLE %s
-# NO_DEMANGLE: {{.*}} (.text+0x0): duplicate symbol '_Z3muldd'
-# NO_DEMANGLE-NEXT: {{.*}} (.text+0x0): previous definition was here
-# NO_DEMANGLE-NEXT: {{.*}} (.text+0x0): duplicate symbol 'foo'
-# NO_DEMANGLE-NEXT: {{.*}} (.text+0x0): previous definition was here
+# NO_DEMANGLE: {{.*}}:(.text+0x0): duplicate symbol '_Z3muldd'
+# NO_DEMANGLE-NEXT: {{.*}}:(.text+0x0): previous definition was here
+# NO_DEMANGLE-NEXT: {{.*}}:(.text+0x0): duplicate symbol 'foo'
+# NO_DEMANGLE-NEXT: {{.*}}:(.text+0x0): previous definition was here
# RUN: not ld.lld %t1.o %t1.o -o %t2 --demangle --no-demangle 2>&1 | \
# RUN: FileCheck -check-prefix=NO_DEMANGLE %s
@@ -25,14 +25,14 @@
# RUN: llvm-ar rcs %t3.a %t2.o
# RUN: not ld.lld %t1.o %t3.a -u baz -o %t2 2>&1 | FileCheck -check-prefix=ARCHIVE %s
-# ARCHIVE: {{.*}}3.a({{.*}}2.o) (.text+0x0): duplicate symbol 'foo'
-# ARCHIVE-NEXT: {{.*}}1.o (.text+0x0): previous definition was here
+# ARCHIVE: {{.*}}3.a({{.*}}2.o):(.text+0x0): duplicate symbol 'foo'
+# ARCHIVE-NEXT: {{.*}}1.o:(.text+0x0): previous definition was here
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/conflict-debug.s -o %t-dbg.o
# RUN: not ld.lld %t-dbg.o %t-dbg.o -o %t-dbg 2>&1 | FileCheck -check-prefix=DBGINFO %s
-# DBGINFO: conflict-debug.s (4): duplicate symbol 'zed'
-# DBGINFO-NEXT: conflict-debug.s (4): previous definition was here
+# DBGINFO: conflict-debug.s:4: duplicate symbol 'zed'
+# DBGINFO-NEXT: conflict-debug.s:4: previous definition was here
.globl _Z3muldd, foo
_Z3muldd:
diff --git a/lld/test/ELF/copy-errors.s b/lld/test/ELF/copy-errors.s
index c370c4bbf25..b0d56c9c6c6 100644
--- a/lld/test/ELF/copy-errors.s
+++ b/lld/test/ELF/copy-errors.s
@@ -9,7 +9,7 @@ _start:
call bar
-// CHECK: {{.*}}.o (.text+0x1): cannot preempt symbol 'bar' defined in {{.*}}.so
+// CHECK: {{.*}}.o:(.text+0x1): cannot preempt symbol 'bar' defined in {{.*}}.so
call zed
// CHECK: symbol 'zed' defined in {{.*}}.so is missing type
diff --git a/lld/test/ELF/copy-in-shared.s b/lld/test/ELF/copy-in-shared.s
index c5dbc7f77ce..b8e57ce9e70 100644
--- a/lld/test/ELF/copy-in-shared.s
+++ b/lld/test/ELF/copy-in-shared.s
@@ -7,4 +7,4 @@
.quad foo
-// CHECK: {{.*}}.o (.text+0x0): can't create dynamic relocation R_X86_64_64 against symbol 'foo' defined in {{.*}}.so
+// CHECK: {{.*}}.o:(.text+0x0): can't create dynamic relocation R_X86_64_64 against symbol 'foo' defined in {{.*}}.so
diff --git a/lld/test/ELF/copy-rel-pie-error.s b/lld/test/ELF/copy-rel-pie-error.s
index 9418eee5b42..7cb6700ef9f 100644
--- a/lld/test/ELF/copy-rel-pie-error.s
+++ b/lld/test/ELF/copy-rel-pie-error.s
@@ -3,8 +3,8 @@
// RUN: ld.lld %t2.o -o %t2.so -shared
// RUN: not ld.lld %t.o %t2.so -o %t.exe -pie 2>&1 | FileCheck %s
-// CHECK: {{.*}}.o (.text+0x0): can't create dynamic relocation R_X86_64_64 against symbol 'bar' defined in {{.*}}.so
-// CHECK: {{.*}}.o (.text+0x8): can't create dynamic relocation R_X86_64_64 against symbol 'foo' defined in {{.*}}.so
+// CHECK: {{.*}}.o:(.text+0x0): can't create dynamic relocation R_X86_64_64 against symbol 'bar' defined in {{.*}}.so
+// CHECK: {{.*}}.o:(.text+0x8): can't create dynamic relocation R_X86_64_64 against symbol 'foo' defined in {{.*}}.so
.global _start
_start:
diff --git a/lld/test/ELF/dynamic-reloc-in-ro.s b/lld/test/ELF/dynamic-reloc-in-ro.s
index cd469daa25c..682dbdd8984 100644
--- a/lld/test/ELF/dynamic-reloc-in-ro.s
+++ b/lld/test/ELF/dynamic-reloc-in-ro.s
@@ -5,4 +5,4 @@
foo:
.quad foo
-// CHECK: {{.*}}.o (.text+0x0): can't create dynamic relocation R_X86_64_64 against local symbol in readonly segment defined in {{.*}}.o
+// CHECK: {{.*}}.o:(.text+0x0): can't create dynamic relocation R_X86_64_64 against local symbol in readonly segment defined in {{.*}}.o
diff --git a/lld/test/ELF/eh-frame-dyn-rel.s b/lld/test/ELF/eh-frame-dyn-rel.s
index 00b7b12456d..91baf597c72 100644
--- a/lld/test/ELF/eh-frame-dyn-rel.s
+++ b/lld/test/ELF/eh-frame-dyn-rel.s
@@ -7,4 +7,4 @@
.cfi_personality 0x8c, foo
.cfi_endproc
-// CHECK: {{.*}}.o (.eh_frame+0x12): can't create dynamic relocation R_X86_64_64 against symbol 'foo' defined in {{.*}}.o
+// CHECK: {{.*}}.o:(.eh_frame+0x12): can't create dynamic relocation R_X86_64_64 against symbol 'foo' defined in {{.*}}.o
diff --git a/lld/test/ELF/libsearch.s b/lld/test/ELF/libsearch.s
index 730445b18ea..20783c5b646 100644
--- a/lld/test/ELF/libsearch.s
+++ b/lld/test/ELF/libsearch.s
@@ -22,7 +22,7 @@
// Should not link because of undefined symbol _bar
// RUN: not ld.lld -o %t3 %t.o %tbar.o 2>&1 \
// RUN: | FileCheck --check-prefix=UNDEFINED %s
-// UNDEFINED: error: {{.*}} (.bar+0x0): undefined symbol '_bar'
+// UNDEFINED: error: {{.*}}:(.bar+0x0): undefined symbol '_bar'
// Should fail if cannot find specified library (without -L switch)
// RUN: not ld.lld -o %t3 %t.o -lls 2>&1 \
diff --git a/lld/test/ELF/linkerscript/edata-etext.s b/lld/test/ELF/linkerscript/edata-etext.s
index e6da8d4a013..fdf5ec1f567 100644
--- a/lld/test/ELF/linkerscript/edata-etext.s
+++ b/lld/test/ELF/linkerscript/edata-etext.s
@@ -2,9 +2,9 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: echo "SECTIONS { }" > %t.script
# RUN: not ld.lld %t.o -script %t.script -o %t 2>&1 | FileCheck %s
-# CHECK: error: {{.*}} (.text+0x0): undefined symbol '_edata'
-# CHECK: error: {{.*}} (.text+0x8): undefined symbol '_etext'
-# CHECK: error: {{.*}} (.text+0x10): undefined symbol '_end'
+# CHECK: error: {{.*}}:(.text+0x0): undefined symbol '_edata'
+# CHECK: error: {{.*}}:(.text+0x8): undefined symbol '_etext'
+# CHECK: error: {{.*}}:(.text+0x10): undefined symbol '_end'
.global _start,_end,_etext,_edata
.text
diff --git a/lld/test/ELF/linkerscript/ehdr_start.s b/lld/test/ELF/linkerscript/ehdr_start.s
index 48055d5b85e..0ae4a4dcfbc 100644
--- a/lld/test/ELF/linkerscript/ehdr_start.s
+++ b/lld/test/ELF/linkerscript/ehdr_start.s
@@ -3,7 +3,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
# RUN: echo "SECTIONS { }" > %t.script
# RUN: not ld.lld %t.o -script %t.script -o %t 2>&1 | FileCheck %s
-# CHECK: error: {{.*}} (.text+0x0): undefined symbol '__ehdr_start'
+# CHECK: error: {{.*}}:(.text+0x0): undefined symbol '__ehdr_start'
.text
.global _start, __ehdr_start
diff --git a/lld/test/ELF/lto/combined-lto-object-name.ll b/lld/test/ELF/lto/combined-lto-object-name.ll
index 60b72245a7c..f46efc4f738 100644
--- a/lld/test/ELF/lto/combined-lto-object-name.ll
+++ b/lld/test/ELF/lto/combined-lto-object-name.ll
@@ -11,4 +11,4 @@ define void @_start() {
ret void
}
-; CHECK: error: ld-temp.o (function _start): undefined symbol 'foo'
+; CHECK: error: ld-temp.o:(function _start): undefined symbol 'foo'
diff --git a/lld/test/ELF/relocation-relative-absolute.s b/lld/test/ELF/relocation-relative-absolute.s
index 69f5e41656c..e1636c734a8 100644
--- a/lld/test/ELF/relocation-relative-absolute.s
+++ b/lld/test/ELF/relocation-relative-absolute.s
@@ -7,6 +7,6 @@
.globl _start
_start:
-# CHECK: {{.*}}input1.o (.text+0x1): relocation R_X86_64_PLT32 cannot refer to absolute symbol 'answer' defined in {{.*}}input2.o
+# CHECK: {{.*}}input1.o:(.text+0x1): relocation R_X86_64_PLT32 cannot refer to absolute symbol 'answer' defined in {{.*}}input2.o
call answer@PLT
diff --git a/lld/test/ELF/sysroot.s b/lld/test/ELF/sysroot.s
index 6ddb6cf37c9..0b7b17260e5 100644
--- a/lld/test/ELF/sysroot.s
+++ b/lld/test/ELF/sysroot.s
@@ -9,7 +9,7 @@
// Should not link because of undefined symbol _bar
// RUN: not ld.lld -o %t/r %t/m.o 2>&1 \
// RUN: | FileCheck --check-prefix=UNDEFINED %s
-// UNDEFINED: error: {{.*}} (.text+0x1): undefined symbol '_bar'
+// UNDEFINED: error: {{.*}}:(.text+0x1): undefined symbol '_bar'
// We need to be sure that there is no suitable library in the /lib directory
// RUN: not ld.lld -o %t/r %t/m.o -L/lib -l:libls.a 2>&1 \
diff --git a/lld/test/ELF/tls-static.s b/lld/test/ELF/tls-static.s
index 31ae3e515f3..b098b68b03f 100644
--- a/lld/test/ELF/tls-static.s
+++ b/lld/test/ELF/tls-static.s
@@ -10,4 +10,4 @@
_start:
call __tls_get_addr
-// CHECK: error: {{.*}} (.text+0x1): undefined symbol '__tls_get_addr'
+// CHECK: error: {{.*}}:(.text+0x1): undefined symbol '__tls_get_addr'
diff --git a/lld/test/ELF/undef-shared.s b/lld/test/ELF/undef-shared.s
index 6bb237e540d..3f01ec25f51 100644
--- a/lld/test/ELF/undef-shared.s
+++ b/lld/test/ELF/undef-shared.s
@@ -1,15 +1,15 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
# RUN: not ld.lld %t.o -o %t.so -shared 2>&1 | FileCheck %s
-# CHECK: error: {{.*}} (.data+0x0): undefined symbol 'hidden'
+# CHECK: error: {{.*}}:(.data+0x0): undefined symbol 'hidden'
.global hidden
.hidden hidden
-# CHECK: error: {{.*}} (.data+0x8): undefined symbol 'internal'
+# CHECK: error: {{.*}}:(.data+0x8): undefined symbol 'internal'
.global internal
.internal internal
-# CHECK: error: {{.*}} (.data+0x10): undefined symbol 'protected'
+# CHECK: error: {{.*}}:(.data+0x10): undefined symbol 'protected'
.global protected
.protected protected
diff --git a/lld/test/ELF/undef.s b/lld/test/ELF/undef.s
index 1ab5e82e185..5ef0b3b35fc 100644
--- a/lld/test/ELF/undef.s
+++ b/lld/test/ELF/undef.s
@@ -5,17 +5,17 @@
# RUN: llvm-ar rc %t2.a %t2.o
# RUN: not ld.lld %t.o %t2.a %t3.o -o %t.exe 2>&1 | FileCheck %s
# RUN: not ld.lld -pie %t.o %t2.a %t3.o -o %t.exe 2>&1 | FileCheck %s
-# CHECK: error: undef.s (.text+0x1): undefined symbol 'foo'
-# CHECK: error: undef.s (.text+0x6): undefined symbol 'bar'
-# CHECK: error: undef.s (.text+0x10): undefined symbol 'foo(int)'
-# CHECK: error: {{.*}}2.a({{.*}}.o) (.text+0x0): undefined symbol 'zed2'
-# CHECK: error: undef-debug.s (3): undefined symbol 'zed3'
-# CHECK: error: undef-debug.s (7): undefined symbol 'zed4'
-# CHECK: error: undef-debug.s (11): undefined symbol 'zed5'
+# CHECK: error: undef.s:(.text+0x1): undefined symbol 'foo'
+# CHECK: error: undef.s:(.text+0x6): undefined symbol 'bar'
+# CHECK: error: undef.s:(.text+0x10): undefined symbol 'foo(int)'
+# CHECK: error: {{.*}}2.a({{.*}}.o):(.text+0x0): undefined symbol 'zed2'
+# CHECK: error: undef-debug.s:3: undefined symbol 'zed3'
+# CHECK: error: undef-debug.s:7: undefined symbol 'zed4'
+# CHECK: error: undef-debug.s:11: undefined symbol 'zed5'
# RUN: not ld.lld %t.o %t2.a -o %t.exe -no-demangle 2>&1 | \
# RUN: FileCheck -check-prefix=NO-DEMANGLE %s
-# NO-DEMANGLE: error: undef.s (.text+0x10): undefined symbol '_Z3fooi'
+# NO-DEMANGLE: error: undef.s:(.text+0x10): undefined symbol '_Z3fooi'
.file "undef.s"
diff --git a/lld/test/ELF/unresolved-symbols.s b/lld/test/ELF/unresolved-symbols.s
index 9c37421fb50..3c33b924578 100644
--- a/lld/test/ELF/unresolved-symbols.s
+++ b/lld/test/ELF/unresolved-symbols.s
@@ -6,7 +6,7 @@
## Check that %t2.o contains undefined symbol undef.
# RUN: not ld.lld %t1.o %t2.o -o %t 2>&1 | \
# RUN: FileCheck -check-prefix=UNDCHECK %s
-# UNDCHECK: error: {{.*}}2.o (.text+0x1): undefined symbol 'undef'
+# UNDCHECK: error: {{.*}}2.o:(.text+0x1): undefined symbol 'undef'
## Error out if unknown option value was set.
# RUN: not ld.lld %t1.o %t2.o -o %t --unresolved-symbols=xxx 2>&1 | \
@@ -19,7 +19,7 @@
# RUN: llvm-readobj %t1_1 > /dev/null 2>&1
# RUN: not ld.lld %t2.o -o %t1_2 --unresolved-symbols=ignore-all --no-undefined 2>&1 | \
# RUN: FileCheck -check-prefix=ERRUND %s
-# ERRUND: error: {{.*}} (.text+0x1): undefined symbol 'undef'
+# ERRUND: error: {{.*}}:(.text+0x1): undefined symbol 'undef'
## Also ignore all should not produce error for symbols from DSOs.
# RUN: ld.lld %t1.o %t.so -o %t1_3 --unresolved-symbols=ignore-all
# RUN: llvm-readobj %t1_3 > /dev/null 2>&1
diff --git a/lld/test/ELF/verneed-local.s b/lld/test/ELF/verneed-local.s
index 9da0673e7ea..94336fddad4 100644
--- a/lld/test/ELF/verneed-local.s
+++ b/lld/test/ELF/verneed-local.s
@@ -2,7 +2,7 @@
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o
# RUN: not ld.lld %t.o %S/Inputs/verneed1.so -o %t 2>&1 | FileCheck %s
-# CHECK: error: {{.*}} (.text+0x1): undefined symbol 'f3'
+# CHECK: error: {{.*}}:(.text+0x1): undefined symbol 'f3'
.globl _start
_start:
call f3
diff --git a/lld/test/ELF/zdefs.s b/lld/test/ELF/zdefs.s
index 333905c0ec2..420f602c41a 100644
--- a/lld/test/ELF/zdefs.s
+++ b/lld/test/ELF/zdefs.s
@@ -2,6 +2,6 @@
# RUN: ld.lld -shared %t.o -o %t1.so
# RUN: not ld.lld -z defs -shared %t.o -o %t1.so 2>&1 | FileCheck -check-prefix=ERR %s
-# ERR: error: {{.*}} (.text+0x1): undefined symbol 'foo'
+# ERR: error: {{.*}}:(.text+0x1): undefined symbol 'foo'
callq foo@PLT
OpenPOWER on IntegriCloud