forked from OSchip/llvm-project
34 lines
1018 B
Plaintext
34 lines
1018 B
Plaintext
# Tests the functionality of archive libraries reading
|
|
# and resolution
|
|
# Note: The binary files would not be required once we have support to generate
|
|
# binary archives from textual(yaml) input
|
|
#
|
|
# Tests generated using the source files below
|
|
# main file
|
|
#
|
|
#extern int __bss_start __attribute__ ((weak));
|
|
#int a;
|
|
#int main()
|
|
#{
|
|
# return 0;
|
|
#}
|
|
#
|
|
|
|
RUN: lld -flavor gnu -target i386 -e main %p/Inputs/writersyms.o -o %t1
|
|
RUN: llvm-nm -n %t1 | FileCheck -check-prefix CHECKSYMS %s
|
|
RUN: lld -flavor gnu -shared -target i386 -e main %p/Inputs/writersyms.o -o %t1
|
|
RUN: llvm-nm -n %t1 | FileCheck -check-prefix CHECKSHAREDSYMS %s
|
|
|
|
CHECKSYMS: {{[0-9a-f]+}} a 1.c
|
|
CHECKSYMS: {{[0-9a-f]+}} T main
|
|
CHECKSYMS: {{[0-9a-f]+}} A __bss_start
|
|
CHECKSYMS: {{[0-9a-f]+}} B a
|
|
CHECKSYMS: {{[0-9a-f]+}} A __bss_end
|
|
CHECKSYMS: {{[0-9a-f]+}} A _end
|
|
CHECKSYMS: {{[0-9a-f]+}} A end
|
|
|
|
CHECKSHAREDSYMS: {{[0-9a-f]+}} a 1.c
|
|
CHECKSHAREDSYMS: {{[0-9a-f]+}} T main
|
|
CHECKSHAREDSYMS: {{[0-9a-f]+}} B a
|
|
CHECKSHAREDSYMS: {{[0-9a-f]+}} A _end
|