reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
# Show that llvm-readobj can print the type of symbol for all known symbol types
# and also for unknown types, both in the os/processor specific ranges and not,
# for both GNU and LLVM styles.

# RUN: yaml2obj %s > %t
# RUN: llvm-readobj --symbols %t | FileCheck %s --check-prefix=LLVM
# RUN: llvm-readelf --symbols %t | FileCheck %s --check-prefix=GNU

# LLVM: Name: notype
# LLVM: Type: None
# LLVM: Name: object
# LLVM: Type: Object
# LLVM: Name: func
# LLVM: Type: Function
# LLVM: Name: .text
# LLVM: Type: Section
# LLVM: Name: file
# LLVM: Type: File
# LLVM: Name: common
# LLVM: Type: Common
# LLVM: Name: tls
# LLVM: Type: TLS
# LLVM: Name: gnu_ifunc
# LLVM: Type: GNU_IFunc

# LLVM: Name: os_specific_11
# LLVM: Type: OS Specific (0xB)
# LLVM: Name: os_specific_12
# LLVM: Type: OS Specific (0xC)

# LLVM: Name: proc_specific_13
# LLVM: Type: Proc Specific (0xD)
# LLVM: Name: proc_specific_14
# LLVM: Type: Proc Specific (0xE)
# LLVM: Name: proc_specific_15
# LLVM: Type: Proc Specific (0xF)

# LLVM: Name: unknown_7
# LLVM: Type: Unknown (0x7)
# LLVM: Name: unknown_8
# LLVM: Type: Unknown (0x8)
# LLVM: Name: unknown_9
# LLVM: Type: Unknown (0x9)

# GNU: NOTYPE  {{.*}} notype
# GNU: OBJECT  {{.*}} object
# GNU: FUNC    {{.*}} func
# GNU: SECTION {{.*}} .text
# GNU: FILE    {{.*}} file
# GNU: COMMON  {{.*}} common
# GNU: TLS     {{.*}} tls
# GNU: IFUNC   {{.*}} gnu_ifunc
# GNU: <OS specific>: 11       {{.*}} os_specific_11
# GNU: <OS specific>: 12       {{.*}} os_specific_12
# GNU: <processor specific>: 13       {{.*}} proc_specific_13
# GNU: <processor specific>: 14       {{.*}} proc_specific_14
# GNU: <processor specific>: 15       {{.*}} proc_specific_15
# GNU: <unknown>: 7       {{.*}} unknown_7
# GNU: <unknown>: 8       {{.*}} unknown_8
# GNU: <unknown>: 9       {{.*}} unknown_9

!ELF
FileHeader:
  Class:   ELFCLASS64
  Data:    ELFDATA2LSB
  Type:    ET_REL
  Machine: EM_X86_64
Sections:
  - Name: .text
    Type: SHT_PROGBITS
Symbols:
  - Name:    notype
    Type:    STT_NOTYPE
    Binding: STB_GLOBAL
  - Name:    object
    Type:    STT_OBJECT
    Binding: STB_GLOBAL
  - Name:    func
    Type:    STT_FUNC
    Binding: STB_GLOBAL
  - Name:    .text
    Type:    STT_SECTION
    Section: .text
    Binding: STB_GLOBAL
  - Name:    file
    Type:    STT_FILE
    Binding: STB_GLOBAL
  - Name:    common
    Type:    STT_COMMON
    Binding: STB_GLOBAL 
  - Name:    tls
    Type:    STT_TLS
    Binding: STB_GLOBAL
  - Name:    gnu_ifunc
    Type:    STT_GNU_IFUNC
    Binding: STB_GLOBAL
  - Name:    os_specific_11
    Type:    11
    Binding: STB_GLOBAL
  - Name:    os_specific_12
    Type:    12
    Binding: STB_GLOBAL
  - Name:    proc_specific_13
    Type:    13
    Binding: STB_GLOBAL
  - Name:    proc_specific_14
    Type:    14
    Binding: STB_GLOBAL
  - Name:    proc_specific_15
    Type:    15
    Binding: STB_GLOBAL
  - Name:    unknown_7
    Type:    7
    Binding: STB_GLOBAL
  - Name:    unknown_8
    Type:    8
    Binding: STB_GLOBAL
  - Name:    unknown_9
    Type:    9
    Binding: STB_GLOBAL