2012-11-14 02:39:10 +08:00
|
|
|
# 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
|
|
|
|
# int main()
|
|
|
|
# {
|
|
|
|
# fn();
|
|
|
|
# return 0;
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
# archive file
|
|
|
|
# int fn()
|
|
|
|
# {
|
|
|
|
# return 0;
|
|
|
|
# }
|
|
|
|
#
|
|
|
|
# int fn1()
|
|
|
|
# {
|
|
|
|
# return 0;
|
|
|
|
# }
|
|
|
|
# gcc -c main.c fn.c fn1.c
|
|
|
|
|
2013-04-05 02:59:24 +08:00
|
|
|
RUN: lld -flavor gnu -target x86_64-linux -e main %p/Inputs/mainobj.x86_64 \
|
2013-09-23 12:24:15 +08:00
|
|
|
RUN: --whole-archive %p/Inputs/libfnarchive.a --no-whole-archive --output-filetype=yaml \
|
2013-04-05 02:59:24 +08:00
|
|
|
RUN: | FileCheck -check-prefix FORCELOAD %s
|
2012-11-14 02:39:10 +08:00
|
|
|
|
2013-01-05 10:22:35 +08:00
|
|
|
FORCELOAD: defined-atoms:
|
2012-11-14 02:39:10 +08:00
|
|
|
FORCELOAD: - name: fn1
|
|
|
|
FORCELOAD: scope: global
|
|
|
|
FORCELOAD: content: [ 55, 48, 89, E5, B8, 00, 00, 00, 00, 5D, C3 ]
|
|
|
|
FORCELOAD: - name: fn
|
|
|
|
FORCELOAD: scope: global
|
|
|
|
FORCELOAD: content: [ 55, 48, 89, E5, B8, 00, 00, 00, 00, 5D, C3 ]
|
2013-01-05 10:22:35 +08:00
|
|
|
FORCELOAD: absolute-atoms:
|
2012-11-14 02:39:10 +08:00
|
|
|
FORCELOAD: - name: main.c
|
|
|
|
FORCELOAD: value: 0x0
|
|
|
|
FORCELOAD: - name: fn1.c
|
|
|
|
FORCELOAD: value: 0x0
|
|
|
|
FORCELOAD: - name: fn.c
|
|
|
|
FORCELOAD: value: 0x0
|