2013-04-03 20:31:38 +02:00
|
|
|
RUN: llvm-readobj -s -t -dt -dynamic-table -needed-libs \
|
|
|
|
RUN: %p/Inputs/shared-object-test.elf-i386 \
|
2012-03-01 02:36:50 +01:00
|
|
|
RUN: | FileCheck %s -check-prefix ELF
|
2013-04-03 20:31:38 +02:00
|
|
|
RUN: llvm-readobj -s -t -dt -dynamic-table -needed-libs \
|
|
|
|
RUN: %p/Inputs/shared-object-test.elf-i386 \
|
2012-03-01 23:19:54 +01:00
|
|
|
RUN: | FileCheck %s -check-prefix ELF32
|
|
|
|
|
2013-04-03 20:31:38 +02:00
|
|
|
RUN: llvm-readobj -s -t -dt -dynamic-table -needed-libs \
|
|
|
|
RUN: %p/Inputs/shared-object-test.elf-x86-64 \
|
2012-03-01 02:36:50 +01:00
|
|
|
RUN: | FileCheck %s -check-prefix ELF
|
2013-04-03 20:31:38 +02:00
|
|
|
RUN: llvm-readobj -s -t -dt -dynamic-table -needed-libs \
|
|
|
|
RUN: %p/Inputs/shared-object-test.elf-x86-64 \
|
2012-03-01 23:19:54 +01:00
|
|
|
RUN: | FileCheck %s -check-prefix ELF64
|
|
|
|
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF64: Format: ELF64-x86-64
|
|
|
|
ELF64: Arch: x86_64
|
|
|
|
ELF64: AddressSize: 64bit
|
|
|
|
ELF64: LoadName: libfoo.so
|
2012-03-01 23:19:54 +01:00
|
|
|
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF32: Format: ELF32-i386
|
|
|
|
ELF32: Arch: i386
|
|
|
|
ELF32: AddressSize: 32bit
|
|
|
|
ELF32: LoadName: libfoo.so
|
2012-03-01 02:36:50 +01:00
|
|
|
|
2013-04-03 20:31:38 +02:00
|
|
|
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: ]
|
2012-03-01 02:36:50 +01:00
|
|
|
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: Symbols [
|
|
|
|
ELF: Symbol {
|
2015-06-03 07:14:22 +02:00
|
|
|
ELF: Name: (0)
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: Binding: Local
|
|
|
|
ELF: Type: Section
|
|
|
|
ELF: Section: .hash
|
|
|
|
ELF: }
|
|
|
|
ELF: Symbol {
|
2015-06-03 07:14:22 +02:00
|
|
|
ELF: Name: (0)
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: Binding: Local
|
|
|
|
ELF: Type: Section
|
|
|
|
ELF: Section: .dynsym
|
|
|
|
ELF: }
|
|
|
|
ELF: Symbol {
|
2015-06-03 07:14:22 +02:00
|
|
|
ELF: Name: (0)
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: Binding: Local
|
|
|
|
ELF: Type: Section
|
|
|
|
ELF: Section: .dynstr
|
|
|
|
ELF: }
|
|
|
|
ELF: Symbol {
|
2015-06-03 07:14:22 +02:00
|
|
|
ELF: Name: (0)
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: Binding: Local
|
|
|
|
ELF: Type: Section
|
|
|
|
ELF: Section: .text
|
|
|
|
ELF: }
|
|
|
|
ELF: Symbol {
|
2015-06-03 07:14:22 +02:00
|
|
|
ELF: Name: (0)
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: Binding: Local
|
|
|
|
ELF: Type: Section
|
|
|
|
ELF: Section: .eh_frame
|
|
|
|
ELF: }
|
|
|
|
ELF: Symbol {
|
2015-06-03 07:14:22 +02:00
|
|
|
ELF: Name: (0)
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: Binding: Local
|
|
|
|
ELF: Type: Section
|
|
|
|
ELF: Section: .tdata
|
|
|
|
ELF: }
|
|
|
|
ELF: Symbol {
|
2015-06-03 07:14:22 +02:00
|
|
|
ELF: Name: (0)
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: Binding: Local
|
|
|
|
ELF: Type: Section
|
|
|
|
ELF: Section: .dynamic
|
|
|
|
ELF: }
|
|
|
|
ELF: Symbol {
|
2015-06-03 07:14:22 +02:00
|
|
|
ELF: Name: (0)
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: Binding: Local
|
|
|
|
ELF: Type: Section
|
|
|
|
ELF: Section: .got.plt
|
|
|
|
ELF: }
|
|
|
|
ELF: Symbol {
|
2015-06-03 07:14:22 +02:00
|
|
|
ELF: Name: (0)
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: Binding: Local
|
|
|
|
ELF: Type: Section
|
|
|
|
ELF: Section: .data
|
|
|
|
ELF: }
|
|
|
|
ELF: Symbol {
|
2015-06-03 07:14:22 +02:00
|
|
|
ELF: Name: (0)
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: Binding: Local
|
|
|
|
ELF: Type: Section
|
|
|
|
ELF: Section: .bss
|
|
|
|
ELF: }
|
|
|
|
ELF: Symbol {
|
|
|
|
ELF: Name: shared.ll
|
|
|
|
ELF: Binding: Local
|
|
|
|
ELF: Type: File
|
2014-03-24 06:00:34 +01:00
|
|
|
ELF: Section: Absolute (0xFFF1)
|
2013-04-03 20:31:38 +02:00
|
|
|
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
|
2014-03-24 06:00:34 +01:00
|
|
|
ELF: Section: Absolute (0xFFF1)
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: }
|
|
|
|
ELF: Symbol {
|
|
|
|
ELF: Name: _DYNAMIC
|
|
|
|
ELF: Binding: Local
|
|
|
|
ELF: Type: Object
|
2014-03-24 06:00:34 +01:00
|
|
|
ELF: Section: Absolute (0xFFF1)
|
2013-04-03 20:31:38 +02:00
|
|
|
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
|
2014-03-24 06:00:34 +01:00
|
|
|
ELF: Section: Absolute (0xFFF1)
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: }
|
|
|
|
ELF: Symbol {
|
|
|
|
ELF: Name: _end
|
|
|
|
ELF: Binding: Global
|
|
|
|
ELF: Type: None
|
2014-03-24 06:00:34 +01:00
|
|
|
ELF: Section: Absolute (0xFFF1)
|
2013-04-03 20:31:38 +02:00
|
|
|
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
|
2014-03-24 06:00:34 +01:00
|
|
|
ELF: Section: Absolute (0xFFF1)
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: }
|
|
|
|
ELF: ]
|
2012-03-01 02:36:50 +01:00
|
|
|
|
2013-04-03 20:31:38 +02:00
|
|
|
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
|
2014-03-24 06:00:34 +01:00
|
|
|
ELF: Section: Absolute (0xFFF1)
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: }
|
|
|
|
ELF: Symbol {
|
|
|
|
ELF: Name: _end
|
|
|
|
ELF: Binding: Global
|
|
|
|
ELF: Type: None
|
2014-03-24 06:00:34 +01:00
|
|
|
ELF: Section: Absolute (0xFFF1)
|
2013-04-03 20:31:38 +02:00
|
|
|
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
|
2014-03-24 06:00:34 +01:00
|
|
|
ELF: Section: Absolute (0xFFF1)
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: }
|
|
|
|
ELF: ]
|
2012-03-01 02:36:50 +01:00
|
|
|
|
2015-10-01 19:57:31 +02:00
|
|
|
ELF32: DynamicSection [ (9 entries)
|
|
|
|
ELF32: Tag Type Name/Value
|
2017-07-14 18:00:16 +02:00
|
|
|
ELF32: 0x00000001 NEEDED Shared library: [libc.so.6]
|
|
|
|
ELF32: 0x00000001 NEEDED Shared library: [libm.so.6]
|
|
|
|
ELF32: 0x0000000E SONAME Library soname: [libfoo.so]
|
2015-10-01 19:57:31 +02:00
|
|
|
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
|
2017-07-14 18:00:16 +02:00
|
|
|
ELF64: 0x0000000000000001 NEEDED Shared library: [libc.so.6]
|
|
|
|
ELF64: 0x0000000000000001 NEEDED Shared library: [libm.so.6]
|
|
|
|
ELF64: 0x000000000000000E SONAME Library soname: [libfoo.so]
|
2015-10-01 19:57:31 +02:00
|
|
|
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: ]
|
|
|
|
|
2012-03-01 02:36:50 +01:00
|
|
|
|
2013-04-03 20:31:38 +02:00
|
|
|
ELF: NeededLibraries [
|
|
|
|
ELF-NEXT: libc.so.6
|
|
|
|
ELF-NEXT: libm.so.6
|
|
|
|
ELF-NEXT: ]
|