2013-01-07 16:00:04 +08:00
|
|
|
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
|
2013-01-11 06:41:19 +08:00
|
|
|
RUN: llvm-readobj %t1 | FileCheck -check-prefix=READOBJ %s
|
|
|
|
RUN: elf-dump --dump-section %t1 | FileCheck -check-prefix=ED %s
|
2012-09-15 00:11:34 +08:00
|
|
|
|
2013-01-11 06:41:19 +08:00
|
|
|
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
|
2013-01-28 14:11:39 +08:00
|
|
|
OBJDUMP: 6 .shstrtab {{[0-9a-f]+}} 0000000000000000
|
|
|
|
OBJDUMP: 7 .symtab {{[0-9a-f]+}} 0000000000000000
|
|
|
|
OBJDUMP: 8 .strtab {{[0-9a-f]+}} 0000000000000000
|
2012-09-15 00:11:34 +08:00
|
|
|
|
|
|
|
READOBJ: File Format : ELF32-i386
|
|
|
|
READOBJ: Arch : i386
|
|
|
|
READOBJ: Address Size: 32 bits
|
2012-10-02 07:53:20 +08:00
|
|
|
READOBJ: Symbols
|
2013-01-07 16:00:04 +08:00
|
|
|
READOBJ: baz FUNC 74 a e8 global
|
|
|
|
READOBJ: y DATA 1004 4 2008 global
|
2012-09-15 00:11:34 +08:00
|
|
|
|
|
|
|
ED: 'e_indent[EI_DATA]', 0x01
|
|
|
|
ED: 'e_machine', 0x0003
|
|
|
|
ED: Section 1
|
2012-11-14 05:34:45 +08:00
|
|
|
ED: 'sh_addralign', 0x00000004
|
2012-10-04 07:27:33 +08:00
|
|
|
ED: Section 2
|
|
|
|
ED: 'sh_addralign', 0x00000004
|
|
|
|
ED: Section 6
|
2012-11-14 05:34:45 +08:00
|
|
|
ED: 'sh_link', 0x00000000
|
2012-12-27 10:26:30 +08:00
|
|
|
ED: 'sh_addralign', 0x00000001
|
|
|
|
ED: Section 7
|
|
|
|
ED: 'sh_link', 0x00000008
|
|
|
|
ED: 'sh_addralign', 0x00000008
|
2012-10-02 07:53:20 +08:00
|
|
|
ED: 'sh_entsize', 0x00000010
|