hanchenye-llvm-project/lld/test/elf/archive-elf.objtxt

40 lines
1.1 KiB
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
# int main()
# {
# fn();
# return 0;
# }
#
# archive file
# int fn()
# {
# return 0;
# }
#
# int fn1()
# {
# return 0;
# }
# gcc -c main.c fn.c fn1.c
RUN: lld-core -reader ELF %p/Inputs/mainobj.x86_64 %p/Inputs/libfnarchive.x86_64 | FileCheck -check-prefix NOFORCELOAD %s
NOFORCELOAD: - name: fn
NOFORCELOAD: scope: global
NOFORCELOAD: type: code
NOFORCELOAD: section-choice: custom-required
NOFORCELOAD: section-name: .text
NOFORCELOAD: content: [ 55, 48, 89, E5, B8, 00, 00, 00, 00, 5D, C3 ]
NOFORCELOAD: - name: main.c
NOFORCELOAD: definition: absolute
NOFORCELOAD: value: 0x0
NOFORCELOAD: - name: fn.c
NOFORCELOAD: definition: absolute
NOFORCELOAD: value: 0x0