llvm.org GIT mirror llvm / 24b0700
Add PPC64_GLINK dynamic tag. Add support for the PPC64_GLINK dynamic tag which is used in the ElfV2 abi. Differential Revision: https://reviews.llvm.org/D45574 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330038 91177308-0d34-0410-b5e6-96231b3b80d8 Sean Fertile 2 years ago
4 changed file(s) with 39 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1313 #ifndef MIPS_DYNAMIC_TAG
1414 #define MIPS_DYNAMIC_TAG(name, value) DYNAMIC_TAG(name, value)
1515 #define MIPS_DYNAMIC_TAG_DEFINED
16 #endif
17
18 #ifndef PPC64_DYNAMIC_TAG
19 #define PPC64_DYNAMIC_TAG(name, value) DYNAMIC_TAG(name, value)
20 #define PPC64_DYNAMIC_TAG_DEFINED
1621 #endif
1722
1823 #ifndef DYNAMIC_TAG_MARKER
170175 MIPS_DYNAMIC_TAG(MIPS_RLD_MAP_REL, 0x70000035) // Relative offset of run time loader
171176 // map, used for debugging.
172177
178 // PPC64 specific dynamic table entries.
179 PPC64_DYNAMIC_TAG(PPC64_GLINK, 0x70000000) // Address of 32 bytes before the
180 // first glink lazy resolver stub.
181
173182 // Sun machine-independent extensions.
174183 DYNAMIC_TAG(AUXILIARY, 0x7FFFFFFD) // Shared object to load before self
175184 DYNAMIC_TAG(FILTER, 0x7FFFFFFF) // Shared object to get values from
180189 #endif
181190 #ifdef MIPS_DYNAMIC_TAG_DEFINED
182191 #undef MIPS_DYNAMIC_TAG
192 #undef MIPS_DYNAMIC_TAG_DEFINED
183193 #endif
184194 #ifdef HEXAGON_DYNAMIC_TAG_DEFINED
185195 #undef HEXAGON_DYNAMIC_TAG
186 #endif
196 #undef HEXAGON_DYNAMIC_TAG_DEFINED
197 #endif
198 #ifdef PPC64_DYNAMIC_TAG_DEFINED
199 #undef PPC64_DYNAMIC_TAG
200 #undef PPC64_DYNAMIC_TAG_DEFINED
201 #endif
0 # Check DT_PPC64_GLINK dynamic tag.
1
2 RUN: llvm-readobj -dynamic-table %p/Inputs/ppc64.exe | FileCheck %s
3
4 CHECK: Format: ELF64-ppc64
5 CHECK: Arch: powerpc64le
6 CHECK: AddressSize: 64bit
7
8 CHECK: DynamicSection [ (25 entries)
9 CHECK-NEXT: Tag Type Name/Value
10 CHECK: 0x0000000070000000 PPC64_GLINK 0x10000830
15501550 #include "llvm/BinaryFormat/DynamicTags.def"
15511551 #undef HEXAGON_DYNAMIC_TAG
15521552 }
1553
15531554 case EM_MIPS:
15541555 switch (Type) {
15551556 #define MIPS_DYNAMIC_TAG(name, value) \
15581559 #include "llvm/BinaryFormat/DynamicTags.def"
15591560 #undef MIPS_DYNAMIC_TAG
15601561 }
1562
1563 case EM_PPC64:
1564 switch(Type) {
1565 #define PPC64_DYNAMIC_TAG(name, value) \
1566 case DT_##name: \
1567 return #name;
1568 #include "llvm/BinaryFormat/DynamicTags.def"
1569 #undef PPC64_DYNAMIC_TAG
1570 }
15611571 }
15621572 #undef DYNAMIC_TAG
15631573 switch (Type) {
15641574 // Now handle all dynamic tags except the architecture specific ones
15651575 #define MIPS_DYNAMIC_TAG(name, value)
15661576 #define HEXAGON_DYNAMIC_TAG(name, value)
1577 #define PPC64_DYNAMIC_TAG(name, value)
15671578 // Also ignore marker tags such as DT_HIOS (maps to DT_VERNEEDNUM), etc.
15681579 #define DYNAMIC_TAG_MARKER(name, value)
15691580 #define DYNAMIC_TAG(name, value) \
15731584 #undef DYNAMIC_TAG
15741585 #undef MIPS_DYNAMIC_TAG
15751586 #undef HEXAGON_DYNAMIC_TAG
1587 #undef PPC64_DYNAMIC_TAG
15761588 #undef DYNAMIC_TAG_MARKER
15771589 default: return "unknown";
15781590 }