• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Check dynamic section tags in case of shared library file.
2RUN: llvm-readobj -dynamic-table %p/Inputs/dynamic-table-so.mips \
3RUN:     | FileCheck %s -check-prefix ELF-MIPS
4
5ELF-MIPS: Format: ELF32-mips
6ELF-MIPS: Arch: mipsel
7ELF-MIPS: AddressSize: 32bit
8ELF-MIPS: LoadName:
9ELF-MIPS: DynamicSection [ (23 entries)
10ELF-MIPS:   Tag        Type                 Name/Value
11ELF-MIPS:   0x00000001 NEEDED               SharedLibrary (libc.so.6)
12ELF-MIPS:   0x0000000C INIT                 0x528
13ELF-MIPS:   0x0000000D FINI                 0x860
14ELF-MIPS:   0x00000004 HASH                 0x210
15ELF-MIPS:   0x00000005 STRTAB               0x3D8
16ELF-MIPS:   0x00000006 SYMTAB               0x2A8
17ELF-MIPS:   0x0000000A STRSZ                231 (bytes)
18ELF-MIPS:   0x0000000B SYMENT               16 (bytes)
19ELF-MIPS:   0x00000003 PLTGOT               0x108E0
20ELF-MIPS:   0x00000011 REL                  0x518
21ELF-MIPS:   0x00000012 RELSZ                16 (bytes)
22ELF-MIPS:   0x00000013 RELENT               8 (bytes)
23ELF-MIPS:   0x70000001 MIPS_RLD_VERSION     1
24ELF-MIPS:   0x70000005 MIPS_FLAGS           NOTPOT
25ELF-MIPS:   0x70000006 MIPS_BASE_ADDRESS    0x0
26ELF-MIPS:   0x7000000A MIPS_LOCAL_GOTNO     10
27ELF-MIPS:   0x70000011 MIPS_SYMTABNO        19
28ELF-MIPS:   0x70000012 MIPS_UNREFEXTNO      26
29ELF-MIPS:   0x70000013 MIPS_GOTSYM          0xD
30ELF-MIPS:   0x6FFFFFFE VERNEED              0x4E8
31ELF-MIPS:   0x6FFFFFFF VERNEEDNUM           1
32ELF-MIPS:   0x6FFFFFF0 VERSYM               0x4C0
33ELF-MIPS:   0x00000000 NULL                 0x0
34ELF-MIPS: ]
35
36// Check dynamic section tags in case of non-pic executable file.
37RUN: llvm-readobj -dynamic-table %p/Inputs/dynamic-table-exe.mips \
38RUN:     | FileCheck %s -check-prefix ELF-MIPS-EXE
39
40ELF-MIPS-EXE: Format: ELF32-mips
41ELF-MIPS-EXE: Arch: mipsel
42ELF-MIPS-EXE: AddressSize: 32bit
43ELF-MIPS-EXE: LoadName:
44ELF-MIPS-EXE: DynamicSection [ (26 entries)
45ELF-MIPS-EXE:   Tag        Type                 Name/Value
46ELF-MIPS-EXE:   0x00000001 NEEDED               SharedLibrary (libc.so.6)
47ELF-MIPS-EXE:   0x0000000C INIT                 0x400418
48ELF-MIPS-EXE:   0x0000000D FINI                 0x4007B0
49ELF-MIPS-EXE:   0x00000004 HASH                 0x4002B8
50ELF-MIPS-EXE:   0x00000005 STRTAB               0x40036C
51ELF-MIPS-EXE:   0x00000006 SYMTAB               0x4002EC
52ELF-MIPS-EXE:   0x0000000A STRSZ                107 (bytes)
53ELF-MIPS-EXE:   0x0000000B SYMENT               16 (bytes)
54ELF-MIPS-EXE:   0x70000016 MIPS_RLD_MAP         0x410880
55ELF-MIPS-EXE:   0x00000015 DEBUG                0x0
56ELF-MIPS-EXE:   0x00000003 PLTGOT               0x410890
57ELF-MIPS-EXE:   0x70000001 MIPS_RLD_VERSION     1
58ELF-MIPS-EXE:   0x70000005 MIPS_FLAGS           NOTPOT
59ELF-MIPS-EXE:   0x70000006 MIPS_BASE_ADDRESS    0x400000
60ELF-MIPS-EXE:   0x7000000A MIPS_LOCAL_GOTNO     5
61ELF-MIPS-EXE:   0x70000011 MIPS_SYMTABNO        8
62ELF-MIPS-EXE:   0x70000012 MIPS_UNREFEXTNO      32
63ELF-MIPS-EXE:   0x70000013 MIPS_GOTSYM          0x7
64ELF-MIPS-EXE:   0x00000014 PLTREL               REL
65ELF-MIPS-EXE:   0x00000017 JMPREL               0x400408
66ELF-MIPS-EXE:   0x00000002 PLTRELSZ             16 (bytes)
67ELF-MIPS-EXE:   0x70000032 MIPS_PLTGOT          0x410854
68ELF-MIPS-EXE:   0x6FFFFFFE VERNEED              0x4003E8
69ELF-MIPS-EXE:   0x6FFFFFFF VERNEEDNUM           1
70ELF-MIPS-EXE:   0x6FFFFFF0 VERSYM               0x4003D8
71ELF-MIPS-EXE:   0x00000000 NULL                 0x0
72ELF-MIPS-EXE: ]
73
74RUN: llvm-readobj -dynamic-table %p/Inputs/dynamic-table-exe.x86 \
75RUN:     | FileCheck %s -check-prefix ELF-X86-EXE
76
77ELF-X86-EXE: Format: ELF32-i386
78ELF-X86-EXE: Arch: i386
79ELF-X86-EXE: AddressSize: 32bit
80ELF-X86-EXE: LoadName:
81ELF-X86-EXE: DynamicSection [ (30 entries)
82ELF-X86-EXE:   Tag        Type                 Name/Value
83ELF-X86-EXE:   0x00000001 NEEDED               SharedLibrary (libstdc++.so.6)
84ELF-X86-EXE:   0x00000001 NEEDED               SharedLibrary (libgcc_s.so.1)
85ELF-X86-EXE:   0x00000001 NEEDED               SharedLibrary (libc.so.6)
86ELF-X86-EXE:   0x0000000C INIT                 0x62C
87ELF-X86-EXE:   0x0000000D FINI                 0x920
88ELF-X86-EXE:   0x00000019 INIT_ARRAY           0x19FC
89ELF-X86-EXE:   0x0000001B INIT_ARRAYSZ         4 (bytes)
90ELF-X86-EXE:   0x0000001A FINI_ARRAY           0x1A00
91ELF-X86-EXE:   0x0000001C FINI_ARRAYSZ         4 (bytes)
92ELF-X86-EXE:   0x00000004 HASH                 0x18C
93ELF-X86-EXE:   0x6FFFFEF5 GNU_HASH             0x1E4
94ELF-X86-EXE:   0x00000005 STRTAB               0x328
95ELF-X86-EXE:   0x00000006 SYMTAB               0x218
96ELF-X86-EXE:   0x0000000A STRSZ                408 (bytes)
97ELF-X86-EXE:   0x0000000B SYMENT               16 (bytes)
98ELF-X86-EXE:   0x00000015 DEBUG                0x0
99ELF-X86-EXE:   0x00000003 PLTGOT               0x1B30
100ELF-X86-EXE:   0x00000002 PLTRELSZ             64 (bytes)
101ELF-X86-EXE:   0x00000014 PLTREL               REL
102ELF-X86-EXE:   0x00000017 JMPREL               0x5EC
103ELF-X86-EXE:   0x00000011 REL                  0x564
104ELF-X86-EXE:   0x00000012 RELSZ                136 (bytes)
105ELF-X86-EXE:   0x00000013 RELENT               8 (bytes)
106ELF-X86-EXE:   0x00000016 TEXTREL
107ELF-X86-EXE:   0x0000001E FLAGS                TEXTREL
108ELF-X86-EXE:   0x6FFFFFFE VERNEED              0x4E4
109ELF-X86-EXE:   0x6FFFFFFF VERNEEDNUM           3
110ELF-X86-EXE:   0x6FFFFFF0 VERSYM               0x4C0
111ELF-X86-EXE:   0x6FFFFFFA RELCOUNT             6
112ELF-X86-EXE:   0x00000000 NULL                 0x0
113ELF-X86-EXE: ]
114