You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

334 lines
7.5 KiB

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 SharedLibrary (libc.so.6)
ELF32: 0x00000001 NEEDED SharedLibrary (libm.so.6)
ELF32: 0x0000000E SONAME LibrarySoname (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 SharedLibrary (libc.so.6)
ELF64: 0x0000000000000001 NEEDED SharedLibrary (libm.so.6)
ELF64: 0x000000000000000E SONAME LibrarySoname (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: ]