• 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
115RUN: llvm-readobj -dynamic-table %p/Inputs/dynamic-table-so.aarch64 \
116RUN:     | FileCheck %s -check-prefix ELF-AARCH64-SO
117
118ELF-AARCH64-SO: Format: ELF64-aarch64-little
119ELF-AARCH64-SO: Arch: aarch64
120ELF-AARCH64-SO: AddressSize: 64bit
121ELF-AARCH64-SO: LoadName:
122ELF-AARCH64-SO: DynamicSection [ (26 entries)
123ELF-AARCH64-SO:   Tag                Type                 Name/Value
124ELF-AARCH64-SO:   0x0000000000000001 NEEDED               SharedLibrary (libc.so.6)
125ELF-AARCH64-SO:   0x000000000000000C INIT                 0x660
126ELF-AARCH64-SO:   0x000000000000000D FINI                 0x83C
127ELF-AARCH64-SO:   0x0000000000000019 INIT_ARRAY           0x10DB8
128ELF-AARCH64-SO:   0x000000000000001B INIT_ARRAYSZ         8 (bytes)
129ELF-AARCH64-SO:   0x000000000000001A FINI_ARRAY           0x10DC0
130ELF-AARCH64-SO:   0x000000000000001C FINI_ARRAYSZ         8 (bytes)
131ELF-AARCH64-SO:   0x000000006FFFFEF5 GNU_HASH             0x1F0
132ELF-AARCH64-SO:   0x0000000000000005 STRTAB               0x420
133ELF-AARCH64-SO:   0x0000000000000006 SYMTAB               0x240
134ELF-AARCH64-SO:   0x000000000000000A STRSZ                210 (bytes)
135ELF-AARCH64-SO:   0x000000000000000B SYMENT               24 (bytes)
136ELF-AARCH64-SO:   0x0000000000000003 PLTGOT               0x10FE8
137ELF-AARCH64-SO:   0x0000000000000002 PLTRELSZ             96 (bytes)
138ELF-AARCH64-SO:   0x0000000000000014 PLTREL               RELA
139ELF-AARCH64-SO:   0x0000000000000017 JMPREL               0x600
140ELF-AARCH64-SO:   0x000000006FFFFEF6 TLSDESC_PLT          0x6D0
141ELF-AARCH64-SO:   0x000000006FFFFEF7 TLSDESC_GOT          0x10FE0
142ELF-AARCH64-SO:   0x0000000000000007 RELA                 0x540
143ELF-AARCH64-SO:   0x0000000000000008 RELASZ               192 (bytes)
144ELF-AARCH64-SO:   0x0000000000000009 RELAENT              24 (bytes)
145ELF-AARCH64-SO:   0x000000006FFFFFFE VERNEED              0x520
146ELF-AARCH64-SO:   0x000000006FFFFFFF VERNEEDNUM           1
147ELF-AARCH64-SO:   0x000000006FFFFFF0 VERSYM               0x4F2
148ELF-AARCH64-SO:   0x000000006FFFFFF9 RELACOUNT            3
149ELF-AARCH64-SO:   0x0000000000000000 NULL                 0x0
150ELF-AARCH64-SO: ]
151