[ELF,test] Add test for -u error message referencing object file (#185938)
When -u creates an undefined symbol and a relocatable file has a weak reference, the error message references the relocatable file, not <internal>.
This commit is contained in:
parent
8fe4b04fc1
commit
3c171f4200
@ -33,6 +33,12 @@
|
||||
# CHECK-U: Section:
|
||||
# CHECK-U-SAME: .text
|
||||
|
||||
## When the definition is not available, the error references the object file,
|
||||
## not <internal>.
|
||||
# RUN: not ld.lld -u foo %t1.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-UERR
|
||||
# CHECK-UERR: error: undefined symbol: foo
|
||||
# CHECK-UERR-NEXT: >>> referenced by {{.*}}1.o
|
||||
|
||||
.weak foo
|
||||
call foo@PLT
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user