llvm-project/lld/test/elf/sections.objtxt

36 lines
1.3 KiB
Plaintext

RUN: lld-core -reader ELF -writer ELF -o %t1 %p/Inputs/section-test.i386
RUN: llvm-objdump -section-headers %t1 | FileCheck -check-prefix=OBJDUMP %s
RUN: llvm-readobj %t1 | FileCheck -check-prefix=READOBJ %s
RUN: elf-dump --dump-section %t1 | FileCheck -check-prefix=ED %s
OBJDUMP: 0 00000000 0000000000000000
OBJDUMP: 1 .text 0000000a 0000000000000074 TEXT DATA
OBJDUMP: 2 .data 00000004 0000000000001000 DATA
OBJDUMP: 3 .special 00000004 0000000000001004 DATA
OBJDUMP: 4 .anotherspecial 00000004 0000000000001008 DATA
OBJDUMP: 5 .bss 00000001 000000000000100c BSS
OBJDUMP: 6 .shstrtab {{[0-9a-f]+}} 0000000000000000
OBJDUMP: 7 .symtab {{[0-9a-f]+}} 0000000000000000
OBJDUMP: 8 .strtab {{[0-9a-f]+}} 0000000000000000
READOBJ: File Format : ELF32-i386
READOBJ: Arch : i386
READOBJ: Address Size: 32 bits
READOBJ: Symbols
READOBJ: baz FUNC 74 a e8 global
READOBJ: y DATA 1004 4 2008 global
ED: 'e_indent[EI_DATA]', 0x01
ED: 'e_machine', 0x0003
ED: Section 1
ED: 'sh_addralign', 0x00000004
ED: Section 2
ED: 'sh_addralign', 0x00000004
ED: Section 6
ED: 'sh_link', 0x00000000
ED: 'sh_addralign', 0x00000001
ED: Section 7
ED: 'sh_link', 0x00000008
ED: 'sh_addralign', 0x00000008
ED: 'sh_entsize', 0x00000010