1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test/Object/readobj-shared-object.test
George Rimar d3752565c9 [llvm-readobj] - Teach readobj to print DT_FILTER dynamic tag in human readable form.
Nothing special here, output format is similar to the format
used by binutils readelf and ELF Tool Chain readelf.

Differential revision: https://reviews.llvm.org/D35351

llvm-svn: 308033
2017-07-14 16:00:16 +00:00

334 lines
7.5 KiB
Plaintext

RUN: llvm-readobj -s -t -dt -dynamic-table -needed-libs \
RUN: %p/Inputs/shared-object-test.elf-i386 \
RUN: | FileCheck %s -check-prefix ELF
RUN: llvm-readobj -s -t -dt -dynamic-table -needed-libs \
RUN: %p/Inputs/shared-object-test.elf-i386 \
RUN: | FileCheck %s -check-prefix ELF32
RUN: llvm-readobj -s -t -dt -dynamic-table -needed-libs \
RUN: %p/Inputs/shared-object-test.elf-x86-64 \
RUN: | FileCheck %s -check-prefix ELF
RUN: llvm-readobj -s -t -dt -dynamic-table -needed-libs \
RUN: %p/Inputs/shared-object-test.elf-x86-64 \
RUN: | FileCheck %s -check-prefix ELF64
ELF64: Format: ELF64-x86-64
ELF64: Arch: x86_64
ELF64: AddressSize: 64bit
ELF64: LoadName: libfoo.so
ELF32: Format: ELF32-i386
ELF32: Arch: i386
ELF32: AddressSize: 32bit
ELF32: LoadName: libfoo.so
ELF: Sections [
ELF: Section {
ELF: Name: (0)
ELF: Type: SHT_NULL
ELF: Flags [ (0x0)
ELF: ]
ELF: }
ELF: Section {
ELF: Name: .hash
ELF: Type: SHT_HASH
ELF: Flags [ (0x2)
ELF: SHF_ALLOC
ELF: ]
ELF: }
ELF: Section {
ELF: Name: .dynsym
ELF: Type: SHT_DYNSYM
ELF: Flags [ (0x2)
ELF: SHF_ALLOC
ELF: ]
ELF: }
ELF: Section {
ELF: Name: .dynstr
ELF: Type: SHT_STRTAB
ELF: Flags [ (0x2)
ELF: SHF_ALLOC
ELF: ]
ELF: }
ELF: Section {
ELF: Name: .text
ELF: Type: SHT_PROGBITS
ELF: Flags [ (0x6)
ELF: SHF_ALLOC
ELF: SHF_EXECINSTR
ELF: ]
ELF: }
ELF: Section {
ELF: Name: .eh_frame
ELF: Type: SHT_PROGBITS
ELF: Flags [ (0x2)
ELF: SHF_ALLOC
ELF: ]
ELF: }
ELF: Section {
ELF: Name: .tdata
ELF: Type: SHT_PROGBITS
ELF: Flags [ (0x403)
ELF: SHF_ALLOC
ELF: SHF_TLS
ELF: SHF_WRITE
ELF: ]
ELF: }
ELF: Section {
ELF: Name: .dynamic
ELF: Type: SHT_DYNAMIC
ELF: Flags [ (0x3)
ELF: SHF_ALLOC
ELF: SHF_WRITE
ELF: ]
ELF: }
ELF: Section {
ELF: Name: .got.plt
ELF: Type: SHT_PROGBITS
ELF: Flags [ (0x3)
ELF: SHF_ALLOC
ELF: SHF_WRITE
ELF: ]
ELF: }
ELF: Section {
ELF: Name: .data
ELF: Type: SHT_PROGBITS
ELF: Flags [ (0x3)
ELF: SHF_ALLOC
ELF: SHF_WRITE
ELF: ]
ELF: }
ELF: Section {
ELF: Name: .bss
ELF: Type: SHT_NOBITS
ELF: Flags [ (0x3)
ELF: SHF_ALLOC
ELF: SHF_WRITE
ELF: ]
ELF: }
ELF: Section {
ELF: Name: .shstrtab
ELF: Type: SHT_STRTAB
ELF: Flags [ (0x0)
ELF: ]
ELF: }
ELF: Section {
ELF: Name: .symtab
ELF: Type: SHT_SYMTAB
ELF: Flags [ (0x0)
ELF: ]
ELF: }
ELF: Section {
ELF: Name: .strtab
ELF: Type: SHT_STRTAB
ELF: Flags [ (0x0)
ELF: ]
ELF: }
ELF: ]
ELF: Symbols [
ELF: Symbol {
ELF: Name: (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .hash
ELF: }
ELF: Symbol {
ELF: Name: (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .dynsym
ELF: }
ELF: Symbol {
ELF: Name: (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .dynstr
ELF: }
ELF: Symbol {
ELF: Name: (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .text
ELF: }
ELF: Symbol {
ELF: Name: (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .eh_frame
ELF: }
ELF: Symbol {
ELF: Name: (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .tdata
ELF: }
ELF: Symbol {
ELF: Name: (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .dynamic
ELF: }
ELF: Symbol {
ELF: Name: (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .got.plt
ELF: }
ELF: Symbol {
ELF: Name: (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .data
ELF: }
ELF: Symbol {
ELF: Name: (0)
ELF: Binding: Local
ELF: Type: Section
ELF: Section: .bss
ELF: }
ELF: Symbol {
ELF: Name: shared.ll
ELF: Binding: Local
ELF: Type: File
ELF: Section: Absolute (0xFFF1)
ELF: }
ELF: Symbol {
ELF: Name: local_func
ELF: Binding: Local
ELF: Type: Function
ELF: Section: .text
ELF: }
ELF: Symbol {
ELF: Name: _GLOBAL_OFFSET_TABLE_
ELF: Binding: Local
ELF: Type: Object
ELF: Section: Absolute (0xFFF1)
ELF: }
ELF: Symbol {
ELF: Name: _DYNAMIC
ELF: Binding: Local
ELF: Type: Object
ELF: Section: Absolute (0xFFF1)
ELF: }
ELF: Symbol {
ELF: Name: common_sym
ELF: Binding: Global
ELF: Type: Object
ELF: Section: .bss
ELF: }
ELF: Symbol {
ELF: Name: tls_sym
ELF: Binding: Global
ELF: Type: TLS
ELF: Section: .tdata
ELF: }
ELF: Symbol {
ELF: Name: defined_sym
ELF: Binding: Global
ELF: Type: Object
ELF: Section: .data
ELF: }
ELF: Symbol {
ELF: Name: __bss_start
ELF: Binding: Global
ELF: Type: None
ELF: Section: Absolute (0xFFF1)
ELF: }
ELF: Symbol {
ELF: Name: _end
ELF: Binding: Global
ELF: Type: None
ELF: Section: Absolute (0xFFF1)
ELF: }
ELF: Symbol {
ELF: Name: global_func
ELF: Binding: Global
ELF: Type: Function
ELF: Section: .text
ELF: }
ELF: Symbol {
ELF: Name: _edata
ELF: Binding: Global
ELF: Type: None
ELF: Section: Absolute (0xFFF1)
ELF: }
ELF: ]
ELF: DynamicSymbols [
ELF: Symbol {
ELF: Name: common_sym
ELF: Binding: Global
ELF: Type: Object
ELF: Section: .bss
ELF: }
ELF: Symbol {
ELF: Name: tls_sym
ELF: Binding: Global
ELF: Type: TLS
ELF: Section: .tdata
ELF: }
ELF: Symbol {
ELF: Name: defined_sym
ELF: Binding: Global
ELF: Type: Object
ELF: Section: .data
ELF: }
ELF: Symbol {
ELF: Name: __bss_start
ELF: Binding: Global
ELF: Type: None
ELF: Section: Absolute (0xFFF1)
ELF: }
ELF: Symbol {
ELF: Name: _end
ELF: Binding: Global
ELF: Type: None
ELF: Section: Absolute (0xFFF1)
ELF: }
ELF: Symbol {
ELF: Name: global_func
ELF: Binding: Global
ELF: Type: Function
ELF: Section: .text
ELF: }
ELF: Symbol {
ELF: Name: _edata
ELF: Binding: Global
ELF: Type: None
ELF: Section: Absolute (0xFFF1)
ELF: }
ELF: ]
ELF32: DynamicSection [ (9 entries)
ELF32: Tag Type Name/Value
ELF32: 0x00000001 NEEDED Shared library: [libc.so.6]
ELF32: 0x00000001 NEEDED Shared library: [libm.so.6]
ELF32: 0x0000000E SONAME Library soname: [libfoo.so]
ELF32: 0x00000004 HASH {{[0-9a-f]+}}
ELF32: 0x00000005 STRTAB {{[0-9a-f]+}}
ELF32: 0x00000006 SYMTAB {{[0-9a-f]+}}
ELF32: 0x0000000A STRSZ {{[0-9]+}} (bytes)
ELF32: 0x0000000B SYMENT {{[0-9]+}} (bytes)
ELF32: 0x00000000 NULL 0x0
ELF32: ]
ELF64: DynamicSection [ (9 entries)
ELF64: Tag Type Name/Value
ELF64: 0x0000000000000001 NEEDED Shared library: [libc.so.6]
ELF64: 0x0000000000000001 NEEDED Shared library: [libm.so.6]
ELF64: 0x000000000000000E SONAME Library soname: [libfoo.so]
ELF64: 0x0000000000000004 HASH {{[0-9a-f]+}}
ELF64: 0x0000000000000005 STRTAB {{[0-9a-f]+}}
ELF64: 0x0000000000000006 SYMTAB {{[0-9a-f]+}}
ELF64: 0x000000000000000A STRSZ {{[0-9]+}} (bytes)
ELF64: 0x000000000000000B SYMENT {{[0-9]+}} (bytes)
ELF64: 0x0000000000000000 NULL 0x0
ELF64: ]
ELF: NeededLibraries [
ELF-NEXT: libc.so.6
ELF-NEXT: libm.so.6
ELF-NEXT: ]