]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/elf/X86_64/initfini.test
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / elf / X86_64 / initfini.test
1 # This tests the functionality that lld is able to read
2 # init_array/fini_array sections in the input ELF. This
3 # corresponds to the the .init_array/.fini_array sections
4 # in the output ELF.
5
6 RUN: lld -flavor gnu -target x86_64-linux %p/Inputs/initfini.o  \
7 RUN: --noinhibit-exec --output-filetype=yaml -o %t
8 RUN: FileCheck %s < %t
9
10 CHECK:  - type:            data
11 CHECK:    content:         [ 00, 00, 00, 00, 00, 00, 00, 00 ]
12 CHECK:    section-name:    .init_array
13 CHECK:    references:
14 CHECK:      - kind:            R_X86_64_64
15 CHECK:        offset:          0
16 CHECK:        target:          constructor
17 CHECK:  - type:            data
18 CHECK:    content:         [ 00, 00, 00, 00, 00, 00, 00, 00 ]
19 CHECK:    section-name:    .fini_array
20 CHECK:    references:
21 CHECK:      - kind:            R_X86_64_64
22 CHECK:        offset:          0
23 CHECK:        target:          destructor