diff options
author | Hemant Kulkarni <khemant@codeaurora.org> | 2016-02-10 20:40:55 +0000 |
---|---|---|
committer | Hemant Kulkarni <khemant@codeaurora.org> | 2016-02-10 20:40:55 +0000 |
commit | d8a985ec7ce0d6a5d0baa9bfc0ed421e5c3eaf02 (patch) | |
tree | 03d3bbdecab376671ac8878e3e9c54758f130aa6 /llvm/test/tools/llvm-readobj/gnu-file-headers.test | |
parent | 992d83fd0ddf45f218ee8fb6d88d13b4c6b0f512 (diff) | |
download | bcm5719-llvm-d8a985ec7ce0d6a5d0baa9bfc0ed421e5c3eaf02.tar.gz bcm5719-llvm-d8a985ec7ce0d6a5d0baa9bfc0ed421e5c3eaf02.zip |
[llvm-readobj] Option to emit readelf like output
New option --elf-output-style=LLVM or GNU
Enables -file-headers in readelf style when elf-output-style=GNU
Differential revision: http://reviews.llvm.org/D14128
llvm-svn: 260430
Diffstat (limited to 'llvm/test/tools/llvm-readobj/gnu-file-headers.test')
-rw-r--r-- | llvm/test/tools/llvm-readobj/gnu-file-headers.test | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-readobj/gnu-file-headers.test b/llvm/test/tools/llvm-readobj/gnu-file-headers.test new file mode 100644 index 00000000000..4b74d0948a3 --- /dev/null +++ b/llvm/test/tools/llvm-readobj/gnu-file-headers.test @@ -0,0 +1,46 @@ +RUN: llvm-readobj -h %p/Inputs/trivial.obj.elf-i386 --elf-output-style=GNU \ +RUN: | FileCheck %s -check-prefix ELF32 +RUN: llvm-readobj -h %p/Inputs/trivial.obj.elf-x86-64 --elf-output-style=GNU \ +RUN: | FileCheck %s -check-prefix ELF64 + +ELF32: ELF Header: +ELF32-NEXT: Magic: 7f 45 4c 46 01 01 01 03 00 00 00 00 00 00 00 00 +ELF32-NEXT: Class: ELF32 +ELF32-NEXT: Data: 2's complement, little endian +ELF32-NEXT: Version: 1 (current) +ELF32-NEXT: OS/ABI: UNIX - GNU +ELF32-NEXT: ABI Version: 0 +ELF32-NEXT: Type: REL (Relocatable file) +ELF32-NEXT: Machine: Intel 80386 +ELF32-NEXT: Version: 0x1 +ELF32-NEXT: Entry point address: 0x0 +ELF32-NEXT: Start of program headers: 0 (bytes into file) +ELF32-NEXT: Start of section headers: 200 (bytes into file) +ELF32-NEXT: Flags: 0x0 +ELF32-NEXT: Size of this header: 52 (bytes) +ELF32-NEXT: Size of program headers: 0 (bytes) +ELF32-NEXT: Number of program headers: 0 +ELF32-NEXT: Size of section headers: 40 (bytes) +ELF32-NEXT: Number of section headers: 10 +ELF32-NEXT: Section header string table index: 7 + +ELF64: ELF Header: +ELF64-NEXT: Magic: 7f 45 4c 46 02 01 01 03 00 00 00 00 00 00 00 00 +ELF64-NEXT: Class: ELF64 +ELF64-NEXT: Data: 2's complement, little endian +ELF64-NEXT: Version: 1 (current) +ELF64-NEXT: OS/ABI: UNIX - GNU +ELF64-NEXT: ABI Version: 0 +ELF64-NEXT: Type: REL (Relocatable file) +ELF64-NEXT: Machine: Advanced Micro Devices X86-64 +ELF64-NEXT: Version: 0x1 +ELF64-NEXT: Entry point address: 0x0 +ELF64-NEXT: Start of program headers: 0 (bytes into file) +ELF64-NEXT: Start of section headers: 184 (bytes into file) +ELF64-NEXT: Flags: 0x0 +ELF64-NEXT: Size of this header: 64 (bytes) +ELF64-NEXT: Size of program headers: 0 (bytes) +ELF64-NEXT: Number of program headers: 0 +ELF64-NEXT: Size of section headers: 64 (bytes) +ELF64-NEXT: Number of section headers: 10 +ELF64-NEXT: Section header string table index: 7 |