2019-07-24 20:20:42 +08:00
|
|
|
# RUN: llvm-readobj --sections --symbols --dyn-syms --needed-libs \
|
|
|
|
# RUN: %p/Inputs/shared-object-test.elf-i386 | FileCheck %s
|
2012-03-02 06:19:54 +08:00
|
|
|
|
2019-07-24 20:20:42 +08:00
|
|
|
# RUN: llvm-readobj --sections --symbols --dyn-syms --needed-libs \
|
|
|
|
# RUN: %p/Inputs/shared-object-test.elf-x86-64 | FileCheck %s
|
2012-03-02 06:19:54 +08:00
|
|
|
|
2019-07-24 20:20:42 +08:00
|
|
|
# CHECK: Sections [
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK: Name: (0)
|
|
|
|
# CHECK: Type: SHT_NULL
|
|
|
|
# CHECK: Flags [ (0x0)
|
|
|
|
# CHECK: ]
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK: Name: .hash
|
|
|
|
# CHECK: Type: SHT_HASH
|
|
|
|
# CHECK: Flags [ (0x2)
|
|
|
|
# CHECK: SHF_ALLOC
|
|
|
|
# CHECK: ]
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK: Name: .dynsym
|
|
|
|
# CHECK: Type: SHT_DYNSYM
|
|
|
|
# CHECK: Flags [ (0x2)
|
|
|
|
# CHECK: SHF_ALLOC
|
|
|
|
# CHECK: ]
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK: Name: .dynstr
|
|
|
|
# CHECK: Type: SHT_STRTAB
|
|
|
|
# CHECK: Flags [ (0x2)
|
|
|
|
# CHECK: SHF_ALLOC
|
|
|
|
# CHECK: ]
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK: Name: .text
|
|
|
|
# CHECK: Type: SHT_PROGBITS
|
|
|
|
# CHECK: Flags [ (0x6)
|
|
|
|
# CHECK: SHF_ALLOC
|
|
|
|
# CHECK: SHF_EXECINSTR
|
|
|
|
# CHECK: ]
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK: Name: .eh_frame
|
|
|
|
# CHECK: Type: SHT_PROGBITS
|
|
|
|
# CHECK: Flags [ (0x2)
|
|
|
|
# CHECK: SHF_ALLOC
|
|
|
|
# CHECK: ]
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK: Name: .tdata
|
|
|
|
# CHECK: Type: SHT_PROGBITS
|
|
|
|
# CHECK: Flags [ (0x403)
|
|
|
|
# CHECK: SHF_ALLOC
|
|
|
|
# CHECK: SHF_TLS
|
|
|
|
# CHECK: SHF_WRITE
|
|
|
|
# CHECK: ]
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK: Name: .dynamic
|
|
|
|
# CHECK: Type: SHT_DYNAMIC
|
|
|
|
# CHECK: Flags [ (0x3)
|
|
|
|
# CHECK: SHF_ALLOC
|
|
|
|
# CHECK: SHF_WRITE
|
|
|
|
# CHECK: ]
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK: Name: .got.plt
|
|
|
|
# CHECK: Type: SHT_PROGBITS
|
|
|
|
# CHECK: Flags [ (0x3)
|
|
|
|
# CHECK: SHF_ALLOC
|
|
|
|
# CHECK: SHF_WRITE
|
|
|
|
# CHECK: ]
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK: Name: .data
|
|
|
|
# CHECK: Type: SHT_PROGBITS
|
|
|
|
# CHECK: Flags [ (0x3)
|
|
|
|
# CHECK: SHF_ALLOC
|
|
|
|
# CHECK: SHF_WRITE
|
|
|
|
# CHECK: ]
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK: Name: .bss
|
|
|
|
# CHECK: Type: SHT_NOBITS
|
|
|
|
# CHECK: Flags [ (0x3)
|
|
|
|
# CHECK: SHF_ALLOC
|
|
|
|
# CHECK: SHF_WRITE
|
|
|
|
# CHECK: ]
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK: Name: .shstrtab
|
|
|
|
# CHECK: Type: SHT_STRTAB
|
|
|
|
# CHECK: Flags [ (0x0)
|
|
|
|
# CHECK: ]
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK: Name: .symtab
|
|
|
|
# CHECK: Type: SHT_SYMTAB
|
|
|
|
# CHECK: Flags [ (0x0)
|
|
|
|
# CHECK: ]
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK: Name: .strtab
|
|
|
|
# CHECK: Type: SHT_STRTAB
|
|
|
|
# CHECK: Flags [ (0x0)
|
|
|
|
# CHECK: ]
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: ]
|
2012-03-02 06:19:54 +08:00
|
|
|
|
2019-07-24 20:20:42 +08:00
|
|
|
# CHECK: Symbols [
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: .hash (0)
|
|
|
|
# CHECK: Binding: Local
|
|
|
|
# CHECK: Type: Section
|
|
|
|
# CHECK: Section: .hash
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: .dynsym (0)
|
|
|
|
# CHECK: Binding: Local
|
|
|
|
# CHECK: Type: Section
|
|
|
|
# CHECK: Section: .dynsym
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: .dynstr (0)
|
|
|
|
# CHECK: Binding: Local
|
|
|
|
# CHECK: Type: Section
|
|
|
|
# CHECK: Section: .dynstr
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: .text (0)
|
|
|
|
# CHECK: Binding: Local
|
|
|
|
# CHECK: Type: Section
|
|
|
|
# CHECK: Section: .text
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: .eh_frame (0)
|
|
|
|
# CHECK: Binding: Local
|
|
|
|
# CHECK: Type: Section
|
|
|
|
# CHECK: Section: .eh_frame
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: .tdata (0)
|
|
|
|
# CHECK: Binding: Local
|
|
|
|
# CHECK: Type: Section
|
|
|
|
# CHECK: Section: .tdata
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: .dynamic (0)
|
|
|
|
# CHECK: Binding: Local
|
|
|
|
# CHECK: Type: Section
|
|
|
|
# CHECK: Section: .dynamic
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: .got.plt (0)
|
|
|
|
# CHECK: Binding: Local
|
|
|
|
# CHECK: Type: Section
|
|
|
|
# CHECK: Section: .got.plt
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: .data (0)
|
|
|
|
# CHECK: Binding: Local
|
|
|
|
# CHECK: Type: Section
|
|
|
|
# CHECK: Section: .data
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: .bss (0)
|
|
|
|
# CHECK: Binding: Local
|
|
|
|
# CHECK: Type: Section
|
|
|
|
# CHECK: Section: .bss
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: shared.ll
|
|
|
|
# CHECK: Binding: Local
|
|
|
|
# CHECK: Type: File
|
|
|
|
# CHECK: Section: Absolute (0xFFF1)
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: local_func
|
|
|
|
# CHECK: Binding: Local
|
|
|
|
# CHECK: Type: Function
|
|
|
|
# CHECK: Section: .text
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: _GLOBAL_OFFSET_TABLE_
|
|
|
|
# CHECK: Binding: Local
|
|
|
|
# CHECK: Type: Object
|
|
|
|
# CHECK: Section: Absolute (0xFFF1)
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: _DYNAMIC
|
|
|
|
# CHECK: Binding: Local
|
|
|
|
# CHECK: Type: Object
|
|
|
|
# CHECK: Section: Absolute (0xFFF1)
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: common_sym
|
|
|
|
# CHECK: Binding: Global
|
|
|
|
# CHECK: Type: Object
|
|
|
|
# CHECK: Section: .bss
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: tls_sym
|
|
|
|
# CHECK: Binding: Global
|
|
|
|
# CHECK: Type: TLS
|
|
|
|
# CHECK: Section: .tdata
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: defined_sym
|
|
|
|
# CHECK: Binding: Global
|
|
|
|
# CHECK: Type: Object
|
|
|
|
# CHECK: Section: .data
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: __bss_start
|
|
|
|
# CHECK: Binding: Global
|
|
|
|
# CHECK: Type: None
|
|
|
|
# CHECK: Section: Absolute (0xFFF1)
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: _end
|
|
|
|
# CHECK: Binding: Global
|
|
|
|
# CHECK: Type: None
|
|
|
|
# CHECK: Section: Absolute (0xFFF1)
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: global_func
|
|
|
|
# CHECK: Binding: Global
|
|
|
|
# CHECK: Type: Function
|
|
|
|
# CHECK: Section: .text
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: _edata
|
|
|
|
# CHECK: Binding: Global
|
|
|
|
# CHECK: Type: None
|
|
|
|
# CHECK: Section: Absolute (0xFFF1)
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: ]
|
2012-03-01 09:36:50 +08:00
|
|
|
|
2019-07-24 20:20:42 +08:00
|
|
|
# CHECK: DynamicSymbols [
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: common_sym
|
|
|
|
# CHECK: Binding: Global
|
|
|
|
# CHECK: Type: Object
|
|
|
|
# CHECK: Section: .bss
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: tls_sym
|
|
|
|
# CHECK: Binding: Global
|
|
|
|
# CHECK: Type: TLS
|
|
|
|
# CHECK: Section: .tdata
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: defined_sym
|
|
|
|
# CHECK: Binding: Global
|
|
|
|
# CHECK: Type: Object
|
|
|
|
# CHECK: Section: .data
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: __bss_start
|
|
|
|
# CHECK: Binding: Global
|
|
|
|
# CHECK: Type: None
|
|
|
|
# CHECK: Section: Absolute (0xFFF1)
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: _end
|
|
|
|
# CHECK: Binding: Global
|
|
|
|
# CHECK: Type: None
|
|
|
|
# CHECK: Section: Absolute (0xFFF1)
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: global_func
|
|
|
|
# CHECK: Binding: Global
|
|
|
|
# CHECK: Type: Function
|
|
|
|
# CHECK: Section: .text
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Symbol {
|
|
|
|
# CHECK: Name: _edata
|
|
|
|
# CHECK: Binding: Global
|
|
|
|
# CHECK: Type: None
|
|
|
|
# CHECK: Section: Absolute (0xFFF1)
|
|
|
|
# CHECK: }
|
|
|
|
# CHECK: ]
|
2012-03-01 09:36:50 +08:00
|
|
|
|
2019-07-24 20:20:42 +08:00
|
|
|
# CHECK: NeededLibraries [
|
|
|
|
# CHECK-NEXT: libc.so.6
|
|
|
|
# CHECK-NEXT: libm.so.6
|
|
|
|
# CHECK-NEXT: ]
|