2014-01-27 11:09:26 +08:00
|
|
|
# Tests the functionality of archive libraries reading
|
|
|
|
# and resolution
|
2013-01-10 11:16:27 +08:00
|
|
|
# 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;
|
2014-01-27 11:09:26 +08:00
|
|
|
#int main()
|
|
|
|
#{
|
2013-01-10 11:16:27 +08:00
|
|
|
# return 0;
|
|
|
|
#}
|
|
|
|
#
|
|
|
|
|
2013-09-14 21:45:29 +08:00
|
|
|
RUN: lld -flavor gnu -target i386 -e main %p/Inputs/writersyms.o -o %t1
|
2013-01-10 11:16:27 +08:00
|
|
|
RUN: llvm-nm -n %t1 | FileCheck -check-prefix CHECKSYMS %s
|
2013-09-14 21:45:29 +08:00
|
|
|
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
|
2013-01-10 11:16:27 +08:00
|
|
|
|
|
|
|
CHECKSYMS: 00000000 a 1.c
|
2013-10-30 08:02:04 +08:00
|
|
|
CHECKSYMS: 00000134 T main
|
2013-03-01 02:38:20 +08:00
|
|
|
CHECKSYMS: 00001000 A __bss_start
|
|
|
|
CHECKSYMS: 00001000 B a
|
|
|
|
CHECKSYMS: 00001004 A __bss_end
|
|
|
|
CHECKSYMS: 00001004 A _end
|
|
|
|
CHECKSYMS: 00001004 A end
|
2013-09-14 21:45:29 +08:00
|
|
|
|
|
|
|
CHECKSHAREDSYMS: 00000000 a 1.c
|
2014-02-20 07:46:13 +08:00
|
|
|
CHECKSHAREDSYMS: 0000010c T main
|
2013-09-14 21:45:29 +08:00
|
|
|
CHECKSHAREDSYMS: 00001000 B a
|
|
|
|
CHECKSHAREDSYMS: 00001004 A _end
|