]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/elf/initfini-options.test-1.test
Vendor import of lld trunk r233088:
[FreeBSD/FreeBSD.git] / test / elf / initfini-options.test-1.test
1 # Check that if there are no -init/-fini options and _init/_fini symbols
2 # are undefined the linker does not emit DT_INIT/DT_FINI tags.
3
4 # RUN: yaml2obj -format=elf %s > %t.o
5 # RUN: lld -flavor gnu -target x86_64 -shared --noinhibit-exec -o %t.so %t.o
6 # RUN: llvm-readobj -dynamic-table %t.so | FileCheck %s
7
8 # CHECK-NOT: 0x000000000000000C INIT 0x{{[0-9A-F]+}}
9 # CHECK-NOT: 0x000000000000000D FINI 0x{{[0-9A-F]+}}
10
11 ---
12 FileHeader:
13   Class:           ELFCLASS64
14   Data:            ELFDATA2LSB
15   Type:            ET_REL
16   Machine:         EM_X86_64
17
18 Sections:
19   - Name:          .text
20     Type:          SHT_PROGBITS
21     Flags:         [ SHF_ALLOC, SHF_EXECINSTR ]
22     AddressAlign:  0x04
23     Size:          0x08
24
25 Symbols:
26   Global:
27     - Name:        _start
28       Type:        STT_FUNC
29       Section:     .text
30       Size:        0x08
31     - Name:        _init
32     - Name:        _fini
33 ...