blob: f8571a6371977c6c047b4a7cc0bb16da549c2df5 [file] [log] [blame]
# Check that if there are no -init/-fini options and _init/_fini symbols
# are undefined the linker does not emit DT_INIT/DT_FINI tags.
# RUN: yaml2obj -format=elf %s > %t.o
# RUN: lld -flavor old-gnu -target x86_64 -shared --noinhibit-exec -o %t.so %t.o
# RUN: llvm-readobj -dynamic-table %t.so | FileCheck %s
# CHECK-NOT: 0x000000000000000C INIT 0x{{[0-9A-F]+}}
# CHECK-NOT: 0x000000000000000D FINI 0x{{[0-9A-F]+}}
---
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2LSB
Type: ET_REL
Machine: EM_X86_64
Sections:
- Name: .text
Type: SHT_PROGBITS
Flags: [ SHF_ALLOC, SHF_EXECINSTR ]
AddressAlign: 0x04
Size: 0x08
Symbols:
Global:
- Name: _start
Type: STT_FUNC
Section: .text
Size: 0x08
- Name: _init
- Name: _fini
...