2012-09-15 00:11:34 +08:00
|
|
|
RUN: lld-core -reader ELF -writer ELF -o %t1 %p/Inputs/section-test.i386 | 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
|
|
|
|
|
2012-12-27 10:26:30 +08:00
|
|
|
OBJDUMP: 0 000000000 00000000000000000
|
|
|
|
OBJDUMP: 1 .text 00000000a 00000000000000000 TEXT DATA
|
|
|
|
OBJDUMP: 2 .data 000000004 00000000000001000 DATA
|
|
|
|
OBJDUMP: 3 .special 000000004 00000000000001004 DATA
|
|
|
|
OBJDUMP: 4 .anotherspecial 000000004 00000000000001008 DATA
|
|
|
|
OBJDUMP: 5 .bss 000000001 0000000000000100c BSS
|
|
|
|
OBJDUMP: 6 .shstrtab 000000045 00000000000000000
|
|
|
|
OBJDUMP: 7 .symtab 0000000c0 00000000000000000
|
|
|
|
OBJDUMP: 8 .strtab 00000003b 00000000000000000
|
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
|
2012-12-27 10:26:30 +08:00
|
|
|
READOBJ: baz FUNC 0 a 1000 global
|
|
|
|
READOBJ: y DATA 1004 4 3008 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
|