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
RUN: llvm-readelf --symbols %p/Inputs/symbols-proc-specific.elf-hexagon \
RUN:  | FileCheck %s --check-prefix ELF32
RUN: llvm-readelf --symbols %p/Inputs/relocs.obj.elf-x86_64 \
RUN:   | FileCheck %s --check-prefix ELF64
RUN: llvm-readelf --symbols %p/Inputs/gnuhash.so.elf-x86_64 \
RUN:   | FileCheck %s --check-prefixes=SYMTAB,DYN
RUN: llvm-readelf --dyn-symbols %p/Inputs/gnuhash.so.elf-x86_64 \
RUN:   | FileCheck %s --check-prefixes=NO-SYMTAB,DYN
RUN: llvm-readelf --symbols --dyn-symbols %p/Inputs/gnuhash.so.elf-x86_64 \
RUN:   | FileCheck %s --check-prefixes=SYMTAB,DYN

ELF32: Symbol table '.symtab' contains 5 entries:
ELF32-NEXT:    Num:    Value  Size Type    Bind   Vis      Ndx Name
ELF32-NEXT:      0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
ELF32-NEXT:      1: 00000000     0 FILE    LOCAL  DEFAULT  ABS a.c
ELF32-NEXT:      2: 00000000    20 FUNC    GLOBAL DEFAULT    2 main
ELF32-NEXT:      3: 00000004     4 OBJECT  GLOBAL DEFAULT PRC[0xff03] x
ELF32-NEXT:      4: 00000000     4 OBJECT  GLOBAL DEFAULT    3 y

ELF64: Symbol table '.symtab' contains 6 entries:
ELF64-NEXT:   Num:    Value          Size Type    Bind   Vis      Ndx Name
ELF64-NEXT:     0:  0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
ELF64-NEXT:     1:  0000000000000000     0 SECTION LOCAL  DEFAULT    1 .text
ELF64-NEXT:     2:  0000000000000000     0 SECTION LOCAL  DEFAULT    3 .data
ELF64-NEXT:     3:  0000000000000000     0 SECTION LOCAL  DEFAULT    4 .bss
ELF64-NEXT:     4:  0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _GLOBAL_OFFSET_TABLE_
ELF64-NEXT:     5:  0000000000000000     0 TLS     GLOBAL DEFAULT  UND sym

NO-SYMTAB-NOT: Symbol table '.symtab'

DYN: Symbol table '.dynsym' contains 5 entries:
DYN-NEXT:   Num:    Value          Size Type    Bind   Vis      Ndx Name
DYN-NEXT:     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
DYN-NEXT:     1: 00000000000001b8     0 NOTYPE  GLOBAL DEFAULT    4 foo
DYN-NEXT:     2: 0000000000200268     0 NOTYPE  GLOBAL DEFAULT    5 _edata
DYN-NEXT:     3: 0000000000200268     0 NOTYPE  GLOBAL DEFAULT    5 _end
DYN-NEXT:     4: 0000000000200268     0 NOTYPE  GLOBAL DEFAULT    5 __bss_start

DYN-NOT: .dynsym
NO-SYMTAB-NOT: Symbol table '.symtab'

SYMTAB: Symbol table '.symtab' contains 12 entries:
SYMTAB-NEXT:   Num:    Value          Size Type    Bind   Vis      Ndx Name
SYMTAB-NEXT:     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
SYMTAB-NEXT:     1: 00000000000000e8     0 SECTION LOCAL  DEFAULT    1 .gnu.hash
SYMTAB-NEXT:     2: 0000000000000120     0 SECTION LOCAL  DEFAULT    2 .dynsym
SYMTAB-NEXT:     3: 0000000000000198     0 SECTION LOCAL  DEFAULT    3 .dynstr
SYMTAB-NEXT:     4: 00000000000001b8     0 SECTION LOCAL  DEFAULT    4 .eh_frame
SYMTAB-NEXT:     5: 00000000002001b8     0 SECTION LOCAL  DEFAULT    5 .dynamic
SYMTAB-NEXT:     6: 00000000002001b8     0 OBJECT  LOCAL  DEFAULT    5 _DYNAMIC
SYMTAB-NEXT:     7: 0000000000200268     0 OBJECT  LOCAL  DEFAULT    5 _GLOBAL_OFFSET_TABLE_
SYMTAB-NEXT:     8: 0000000000200268     0 NOTYPE  GLOBAL DEFAULT    5 __bss_start
SYMTAB-NEXT:     9: 00000000000001b8     0 NOTYPE  GLOBAL DEFAULT    4 foo
SYMTAB-NEXT:    10: 0000000000200268     0 NOTYPE  GLOBAL DEFAULT    5 _edata
SYMTAB-NEXT:    11: 0000000000200268     0 NOTYPE  GLOBAL DEFAULT    5 _end

DYN-NOT: .dynsym