[lld] r287537 - Change the way how we print out line numbers.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 21 05:49:58 PST 2016


Author: ruiu
Date: Mon Nov 21 07:49:57 2016
New Revision: 287537

URL: http://llvm.org/viewvc/llvm-project?rev=287537&view=rev
Log:
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

Modified:
    lld/trunk/ELF/InputFiles.cpp
    lld/trunk/ELF/Relocations.cpp
    lld/trunk/test/ELF/aarch64-fpic-add_abs_lo12_nc.s
    lld/trunk/test/ELF/aarch64-fpic-adr_prel_lo21.s
    lld/trunk/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s
    lld/trunk/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s
    lld/trunk/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s
    lld/trunk/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s
    lld/trunk/test/ELF/arm-target1.s
    lld/trunk/test/ELF/basic.s
    lld/trunk/test/ELF/conflict.s
    lld/trunk/test/ELF/copy-errors.s
    lld/trunk/test/ELF/copy-in-shared.s
    lld/trunk/test/ELF/copy-rel-pie-error.s
    lld/trunk/test/ELF/dynamic-reloc-in-ro.s
    lld/trunk/test/ELF/eh-frame-dyn-rel.s
    lld/trunk/test/ELF/libsearch.s
    lld/trunk/test/ELF/linkerscript/edata-etext.s
    lld/trunk/test/ELF/linkerscript/ehdr_start.s
    lld/trunk/test/ELF/lto/combined-lto-object-name.ll
    lld/trunk/test/ELF/relocation-relative-absolute.s
    lld/trunk/test/ELF/sysroot.s
    lld/trunk/test/ELF/tls-static.s
    lld/trunk/test/ELF/undef-shared.s
    lld/trunk/test/ELF/undef.s
    lld/trunk/test/ELF/unresolved-symbols.s
    lld/trunk/test/ELF/verneed-local.s
    lld/trunk/test/ELF/zdefs.s

Modified: lld/trunk/ELF/InputFiles.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/ELF/InputFiles.cpp (original)
+++ lld/trunk/ELF/InputFiles.cpp Mon Nov 21 07:49:57 2016
@@ -91,7 +91,7 @@ std::string elf::ObjectFile<ELFT>::getLi
                                  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".

Modified: lld/trunk/ELF/Relocations.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.cpp?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.cpp (original)
+++ lld/trunk/ELF/Relocations.cpp Mon Nov 21 07:49:57 2016
@@ -554,11 +554,11 @@ std::string getLocation(InputSectionBase
   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();
 }
 

Modified: lld/trunk/test/ELF/aarch64-fpic-add_abs_lo12_nc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-fpic-add_abs_lo12_nc.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-fpic-add_abs_lo12_nc.s (original)
+++ lld/trunk/test/ELF/aarch64-fpic-add_abs_lo12_nc.s Mon Nov 21 07:49:57 2016
@@ -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

Modified: lld/trunk/test/ELF/aarch64-fpic-adr_prel_lo21.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-fpic-adr_prel_lo21.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-fpic-adr_prel_lo21.s (original)
+++ lld/trunk/test/ELF/aarch64-fpic-adr_prel_lo21.s Mon Nov 21 07:49:57 2016
@@ -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

Modified: lld/trunk/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s (original)
+++ lld/trunk/test/ELF/aarch64-fpic-adr_prel_pg_hi21.s Mon Nov 21 07:49:57 2016
@@ -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

Modified: lld/trunk/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s (original)
+++ lld/trunk/test/ELF/aarch64-fpic-ldst32_abs_lo12_nc.s Mon Nov 21 07:49:57 2016
@@ -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

Modified: lld/trunk/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s (original)
+++ lld/trunk/test/ELF/aarch64-fpic-ldst64_abs_lo12_nc.s Mon Nov 21 07:49:57 2016
@@ -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

Modified: lld/trunk/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s (original)
+++ lld/trunk/test/ELF/aarch64-fpic-ldst8_abs_lo12_nc.s Mon Nov 21 07:49:57 2016
@@ -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

Modified: lld/trunk/test/ELF/arm-target1.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/arm-target1.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/arm-target1.s (original)
+++ lld/trunk/test/ELF/arm-target1.s Mon Nov 21 07:49:57 2016
@@ -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

Modified: lld/trunk/test/ELF/basic.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/basic.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/basic.s (original)
+++ lld/trunk/test/ELF/basic.s Mon Nov 21 07:49:57 2016
@@ -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

Modified: lld/trunk/test/ELF/conflict.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/conflict.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/conflict.s (original)
+++ lld/trunk/test/ELF/conflict.s Mon Nov 21 07:49:57 2016
@@ -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:

Modified: lld/trunk/test/ELF/copy-errors.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/copy-errors.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/copy-errors.s (original)
+++ lld/trunk/test/ELF/copy-errors.s Mon Nov 21 07:49:57 2016
@@ -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

Modified: lld/trunk/test/ELF/copy-in-shared.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/copy-in-shared.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/copy-in-shared.s (original)
+++ lld/trunk/test/ELF/copy-in-shared.s Mon Nov 21 07:49:57 2016
@@ -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

Modified: lld/trunk/test/ELF/copy-rel-pie-error.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/copy-rel-pie-error.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/copy-rel-pie-error.s (original)
+++ lld/trunk/test/ELF/copy-rel-pie-error.s Mon Nov 21 07:49:57 2016
@@ -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:

Modified: lld/trunk/test/ELF/dynamic-reloc-in-ro.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/dynamic-reloc-in-ro.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/dynamic-reloc-in-ro.s (original)
+++ lld/trunk/test/ELF/dynamic-reloc-in-ro.s Mon Nov 21 07:49:57 2016
@@ -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

Modified: lld/trunk/test/ELF/eh-frame-dyn-rel.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/eh-frame-dyn-rel.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/eh-frame-dyn-rel.s (original)
+++ lld/trunk/test/ELF/eh-frame-dyn-rel.s Mon Nov 21 07:49:57 2016
@@ -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

Modified: lld/trunk/test/ELF/libsearch.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/libsearch.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/libsearch.s (original)
+++ lld/trunk/test/ELF/libsearch.s Mon Nov 21 07:49:57 2016
@@ -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 \

Modified: lld/trunk/test/ELF/linkerscript/edata-etext.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/edata-etext.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/edata-etext.s (original)
+++ lld/trunk/test/ELF/linkerscript/edata-etext.s Mon Nov 21 07:49:57 2016
@@ -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

Modified: lld/trunk/test/ELF/linkerscript/ehdr_start.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/ehdr_start.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/ehdr_start.s (original)
+++ lld/trunk/test/ELF/linkerscript/ehdr_start.s Mon Nov 21 07:49:57 2016
@@ -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

Modified: lld/trunk/test/ELF/lto/combined-lto-object-name.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/combined-lto-object-name.ll?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/lto/combined-lto-object-name.ll (original)
+++ lld/trunk/test/ELF/lto/combined-lto-object-name.ll Mon Nov 21 07:49:57 2016
@@ -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'

Modified: lld/trunk/test/ELF/relocation-relative-absolute.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/relocation-relative-absolute.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/relocation-relative-absolute.s (original)
+++ lld/trunk/test/ELF/relocation-relative-absolute.s Mon Nov 21 07:49:57 2016
@@ -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 at PLT

Modified: lld/trunk/test/ELF/sysroot.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/sysroot.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/sysroot.s (original)
+++ lld/trunk/test/ELF/sysroot.s Mon Nov 21 07:49:57 2016
@@ -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 \

Modified: lld/trunk/test/ELF/tls-static.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/tls-static.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/tls-static.s (original)
+++ lld/trunk/test/ELF/tls-static.s Mon Nov 21 07:49:57 2016
@@ -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'

Modified: lld/trunk/test/ELF/undef-shared.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/undef-shared.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/undef-shared.s (original)
+++ lld/trunk/test/ELF/undef-shared.s Mon Nov 21 07:49:57 2016
@@ -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
 

Modified: lld/trunk/test/ELF/undef.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/undef.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/undef.s (original)
+++ lld/trunk/test/ELF/undef.s Mon Nov 21 07:49:57 2016
@@ -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"
 

Modified: lld/trunk/test/ELF/unresolved-symbols.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/unresolved-symbols.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/unresolved-symbols.s (original)
+++ lld/trunk/test/ELF/unresolved-symbols.s Mon Nov 21 07:49:57 2016
@@ -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

Modified: lld/trunk/test/ELF/verneed-local.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/verneed-local.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/verneed-local.s (original)
+++ lld/trunk/test/ELF/verneed-local.s Mon Nov 21 07:49:57 2016
@@ -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

Modified: lld/trunk/test/ELF/zdefs.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/zdefs.s?rev=287537&r1=287536&r2=287537&view=diff
==============================================================================
--- lld/trunk/test/ELF/zdefs.s (original)
+++ lld/trunk/test/ELF/zdefs.s Mon Nov 21 07:49:57 2016
@@ -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 at PLT




More information about the llvm-commits mailing list