aboutsummaryrefslogtreecommitdiff
path: root/test/old-elf/X86_64/undef.test
blob: f948286a339b1dac52c804df58cbc54c40ef89e7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 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 old-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 old-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