brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.7 KiB · 5762d3b Raw
107 lines · plain
1# REQUIRES: x862# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o3# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/undef.s -o %t2.o4# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/undef-debug.s -o %t3.o5# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/undef-bad-debug.s -o %t4.o6# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %p/Inputs/undef-debug2.s -o %t5.o7# RUN: rm -f %t2.a8# RUN: llvm-ar rc %t2.a %t2.o9# RUN: not ld.lld --threads=1 %t.o %t2.a %t3.o %t4.o %t5.o -o /dev/null 2>&1 \10# RUN:   | FileCheck %s --implicit-check-not="error:" --implicit-check-not="warning:"11# RUN: not ld.lld --threads=1 -pie %t.o %t2.a %t3.o %t4.o %t5.o -o /dev/null 2>&1 \12# RUN:   | FileCheck %s --implicit-check-not="error:" --implicit-check-not="warning:"13 14# CHECK:      error: undefined symbol: foo15# CHECK-NEXT: >>> referenced by undef.s16# CHECK-NEXT:                   {{.*}}:(.text+0x1)17 18# CHECK:      error: undefined symbol: bar19# CHECK-NEXT: >>> referenced by undef.s20# CHECK-NEXT: >>>               {{.*}}:(.text+0x6)21 22# CHECK:      error: undefined symbol: foo(int)23# CHECK-NEXT: >>> referenced by undef.s24# CHECK-NEXT: >>>               {{.*}}:(.text+0x10)25 26# CHECK:      error: undefined symbol: vtable for Foo 27# CHECK-NEXT: >>> referenced by undef.s28# CHECK-NEXT: >>>               {{.*}}:(.text+0x15)29# CHECK-NEXT: >>> the vtable symbol may be undefined because the class is missing its key function (see https://lld.llvm.org/missingkeyfunction)30 31# CHECK:      error: undefined symbol: foo(int)32# CHECK-NEXT: >>> referenced by undef.s33# CHECK-NEXT: >>>               {{.*}}:(.text+0x1a)34 35# CHECK:      error: undefined symbol: Pi36# CHECK-NEXT: >>> referenced by undef.s37# CHECK-NEXT: >>>               {{.*}}:(.text+0x1f)38 39# CHECK:      error: undefined symbol: D main40# CHECK-NEXT: >>> referenced by undef.s41# CHECK-NEXT: >>>               {{.*}}:(.text+0x24)42 43# CHECK:      error: undefined symbol: a::main44# CHECK-NEXT: >>> referenced by undef.s45# CHECK-NEXT: >>>               {{.*}}:(.text+0x29)46 47# CHECK:      error: undefined symbol: zed248# CHECK-NEXT: >>> referenced by {{.*}}.o:(.text+0x0) in archive {{.*}}2.a49 50# CHECK:      error: undefined symbol: zed351# CHECK-NEXT: >>> referenced by undef-debug.s:3 (dir{{/|\\}}undef-debug.s:3)52# CHECK-NEXT: >>>               {{.*}}.o:(.text+0x0)53 54# CHECK:      error: undefined symbol: zed455# CHECK-NEXT: >>> referenced by undef-debug.s:7 (dir{{/|\\}}undef-debug.s:7)56# CHECK-NEXT: >>>               {{.*}}.o:(.text.1+0x0)57 58# CHECK:      error: undefined symbol: zed559# CHECK-NEXT: >>> referenced by undef-debug.s:11 (dir{{/|\\}}undef-debug.s:11)60# CHECK-NEXT: >>>               {{.*}}.o:(.text.2+0x0)61 62# Show that all line table problems are mentioned as soon as the object's line information63# is requested, even if that particular part of the line information is not currently required.64# Also show that the warnings are only printed once.65# CHECK:      warning: unknown data in line table prologue at offset 0x00000000: parsing ended (at offset 0x00000037) before reaching the prologue end at offset 0x0000003866# CHECK-NEXT: warning: parsing line table prologue at offset 0x0000005b: unsupported version 167# CHECK-NEXT: warning: last sequence in debug line table at offset 0x00000061 is not terminated68# CHECK:      error: undefined symbol: zed6a69# CHECK-NEXT: >>> referenced by undef-bad-debug.s:11 (dir{{/|\\}}undef-bad-debug.s:11)70# CHECK-NEXT: >>>               {{.*}}4.o:(.text+0x0)71# CHECK:      error: undefined symbol: zed6b72# CHECK-NEXT: >>> referenced by undef-bad-debug.s:21 (dir{{/|\\}}undef-bad-debug.s:21)73# CHECK-NEXT: >>>               {{.*}}4.o:(.text+0x8)74 75# Show that a problem in a line table that prevents further parsing of that76# table means that no line information is displayed in the wardning.77# CHECK:      error: undefined symbol: zed778# CHECK-NEXT: >>> referenced by {{.*}}4.o:(.text+0x10)79 80# Show that a problem with one line table's information doesn't affect getting information from81# a different one in the same object.82# CHECK:      error: undefined symbol: zed883# CHECK-NEXT: >>> referenced by undef-bad-debug2.s:11 (dir2{{/|\\}}undef-bad-debug2.s:11)84# CHECK-NEXT: >>>               {{.*}}tmp4.o:(.text+0x18)85 86# CHECK:      error: undefined symbol: zed987# CHECK-NEXT: >>> referenced by undef-debug2.cc:3 (dir{{/|\\}}undef-debug2.cc:3)88# CHECK-NEXT: >>>               {{.*}}tmp5.o:(ns::var)89 90# RUN: not ld.lld %t.o %t2.a -o /dev/null -no-demangle 2>&1 | \91# RUN:   FileCheck -check-prefix=NO-DEMANGLE %s92# NO-DEMANGLE: error: undefined symbol: _Z3fooi93 94.file "undef.s"95 96  .globl _start97_start:98  call foo99  call bar100  call zed1101  call _Z3fooi102  call _ZTV3Foo103  call __Z3fooi104  call Pi105  call _Dmain106  call _RNvC1a4main107