RUN: llvm-readobj -symbols %p/Inputs/symbols-proc-specific.elf-hexagon \
RUN:  --elf-output-style=GNU | FileCheck %s -check-prefix ELF32
RUN: llvm-readobj -symbols %p/Inputs/relocs.obj.elf-x86_64 --elf-output-style=GNU \
RUN:   | FileCheck %s -check-prefix ELF64
RUN: llvm-readobj -symbols %p/Inputs/gnuhash.so.elf-x86_64 --elf-output-style=GNU \
RUN:   | FileCheck %s -check-prefix DYN
RUN: llvm-readobj -dyn-symbols %p/Inputs/dynamic-table-exe.x86 --elf-output-style=GNU \
RUN:   | FileCheck %s -check-prefix HASH

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
ELF64-NEXT:     2:  0000000000000000     0 SECTION LOCAL  DEFAULT    3
ELF64-NEXT:     3:  0000000000000000     0 SECTION LOCAL  DEFAULT    4
ELF64-NEXT:     4:  0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _GLOBAL_OFFSET_TABLE_
ELF64-NEXT:     5:  0000000000000000     0 TLS     GLOBAL DEFAULT  UND sym

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: Symbol table '.symtab' contains 12 entries:
DYN-NEXT:   Num:    Value          Size Type    Bind   Vis      Ndx Name
DYN-NEXT:     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
DYN-NEXT:     1: 00000000000000e8     0 SECTION LOCAL  DEFAULT    1
DYN-NEXT:     2: 0000000000000120     0 SECTION LOCAL  DEFAULT    2
DYN-NEXT:     3: 0000000000000198     0 SECTION LOCAL  DEFAULT    3
DYN-NEXT:     4: 00000000000001b8     0 SECTION LOCAL  DEFAULT    4
DYN-NEXT:     5: 00000000002001b8     0 SECTION LOCAL  DEFAULT    5
DYN-NEXT:     6: 00000000002001b8     0 OBJECT  LOCAL  DEFAULT    5 _DYNAMIC
DYN-NEXT:     7: 0000000000200268     0 OBJECT  LOCAL  DEFAULT    5 _GLOBAL_OFFSET_TABLE_
DYN-NEXT:     8: 0000000000200268     0 NOTYPE  GLOBAL DEFAULT    5 __bss_start
DYN-NEXT:     9: 00000000000001b8     0 NOTYPE  GLOBAL DEFAULT    4 foo
DYN-NEXT:    10: 0000000000200268     0 NOTYPE  GLOBAL DEFAULT    5 _edata
DYN-NEXT:    11: 0000000000200268     0 NOTYPE  GLOBAL DEFAULT    5 _end

HASH:     Symbol table of .hash for image:
HASH-NEXT:   Num Buc:    Value  Size   Type   Bind Vis      Ndx Name
HASH-NEXT:     9   0: 00000000     0 FUNC    GLOBAL DEFAULT UND __gxx_personality_v0@CXXABI_1.3
HASH-NEXT:    13   0: 00001b64     0 NOTYPE  GLOBAL DEFAULT ABS _edata@
HASH-NEXT:     7   0: 00000000     0 FUNC    GLOBAL DEFAULT UND _ZNSt14basic_ifstreamIcSt11char_traitsIcEEC1EPKcSt13_Ios_Openmode@GLIBCXX_3.4
HASH-NEXT:     2   0: 00000000     0 NOTYPE  WEAK   DEFAULT UND _Jv_RegisterClasses@
HASH-NEXT:     1   0: 00000000     0 NOTYPE  WEAK   DEFAULT UND __gmon_start__@
HASH-NEXT:    16   1: 00000850    81 FUNC    GLOBAL DEFAULT  14 main@
HASH-NEXT:    10   1: 00000000     0 FUNC    GLOBAL DEFAULT UND _Unwind_Resume@GCC_3.0
HASH-NEXT:     8   1: 00000000     0 FUNC    GLOBAL DEFAULT UND puts@GLIBC_2.0
HASH-NEXT:    12   1: 00001b68     0 NOTYPE  GLOBAL DEFAULT ABS _end@
HASH-NEXT:     6   1: 00000000     0 FUNC    GLOBAL DEFAULT UND _ZNSt14basic_ifstreamIcSt11char_traitsIcEED1Ev@GLIBCXX_3.4
HASH-NEXT:     5   1: 00000000     0 NOTYPE  WEAK   DEFAULT UND _ITM_registerTMCloneTable@
HASH-NEXT:     4   1: 00000000     0 NOTYPE  WEAK   DEFAULT UND _ITM_deregisterTMCloneTable@
HASH-NEXT:     3   1: 00000000     0 FUNC    GLOBAL DEFAULT UND __libc_start_main@GLIBC_2.0
HASH-NEXT:    11   2: 00000000     0 FUNC    WEAK   DEFAULT UND __cxa_finalize@GLIBC_2.1.3
HASH-NEXT:    15   2: 00001b64     0 NOTYPE  GLOBAL DEFAULT ABS __bss_start@
HASH-NEXT:    14   2: 0000093c     4 OBJECT  GLOBAL DEFAULT  16 _IO_stdin_used@
HASH:     Symbol table of .gnu.hash for image:
HASH-NEXT:   Num Buc:    Value  Size   Type   Bind Vis      Ndx Name
HASH-NEXT:    12   0: 00001b68     0 NOTYPE  GLOBAL DEFAULT ABS _end@
HASH-NEXT:    13   0: 00001b64     0 NOTYPE  GLOBAL DEFAULT ABS _edata@
HASH-NEXT:    14   1: 0000093c     4 OBJECT  GLOBAL DEFAULT  16 _IO_stdin_used@
HASH-NEXT:    15   1: 00001b64     0 NOTYPE  GLOBAL DEFAULT ABS __bss_start@
HASH-NEXT:    16   1: 00000850    81 FUNC    GLOBAL DEFAULT  14 main@