llvm-project/lld/test/elf/X86_64/undef.test

19 lines
747 B
Plaintext

# This tests the functionality that an undefined symbol thats defined in the
# commmand line pulls in the required object file from the archive library
# which is usually the usecase for it
RUN: lld -flavor gnu -target x86_64 -u fn %p/Inputs/libfn.a -o %t --noinhibit-exec
RUN: llvm-readobj -symbols %t | FileCheck -check-prefix=SYMFROMARCHIVE %s
RUN: lld -flavor gnu -target x86_64 %p/Inputs/libfn.a -o %t --noinhibit-exec
RUN: llvm-readobj -symbols %t | FileCheck %s
SYMFROMARCHIVE: Symbol {
SYMFROMARCHIVE: Name: fn ({{[0-9]+}}
SYMFROMARCHIVE: Size: 11
SYMFROMARCHIVE: Binding: Global (0x1)
SYMFROMARCHIVE: Type: Function (0x2)
SYMFROMARCHIVE: Other: 0
SYMFROMARCHIVE: Section: .text
SYMFROMARCHIVE: }
CHECK-NOT: Name: fn