Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-projects commit in pax-utils: elf.h paxelf.c
Date: Sat, 24 Nov 2012 20:16:38
Message-Id: 20121124201626.DF30B20C65@flycatcher.gentoo.org
1 vapier 12/11/24 20:16:26
2
3 Modified: elf.h paxelf.c
4 Log:
5 sync elf.h settings
6
7 Revision Changes Path
8 1.9 pax-utils/elf.h
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/elf.h?rev=1.9&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/elf.h?rev=1.9&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/elf.h?r1=1.8&r2=1.9
13
14 Index: elf.h
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-projects/pax-utils/elf.h,v
17 retrieving revision 1.8
18 retrieving revision 1.9
19 diff -u -r1.8 -r1.9
20 --- elf.h 17 Jun 2008 17:07:57 -0000 1.8
21 +++ elf.h 24 Nov 2012 20:16:26 -0000 1.9
22 @@ -1,5 +1,5 @@
23 /* This file defines standard ELF types, structures, and macros.
24 - Copyright (C) 1995-2003, 2004, 2005 Free Software Foundation, Inc.
25 + Copyright (C) 1995-2012 Free Software Foundation, Inc.
26 This file is part of the GNU C Library.
27
28 The GNU C Library is free software; you can redistribute it and/or
29 @@ -13,15 +13,16 @@
30 Lesser General Public License for more details.
31
32 You should have received a copy of the GNU Lesser General Public
33 - License along with the GNU C Library; if not, write to the Free
34 - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
35 - 02111-1307 USA. */
36 + License along with the GNU C Library; if not, see
37 + <http://www.gnu.org/licenses/>. */
38
39 #ifndef _ELF_H
40 #define _ELF_H 1
41
42 /* Standard ELF types. */
43
44 +#include <stdint.h>
45 +
46 /* Type for a 16-bit quantity. */
47 typedef uint16_t Elf32_Half;
48 typedef uint16_t Elf64_Half;
49 @@ -54,6 +55,7 @@
50 typedef Elf32_Half Elf32_Versym;
51 typedef Elf64_Half Elf64_Versym;
52
53 +
54 /* The ELF file header. This appears at the start of every ELF file. */
55
56 #define EI_NIDENT (16)
57 @@ -134,7 +136,8 @@
58 #define ELFOSABI_SYSV 0 /* Alias. */
59 #define ELFOSABI_HPUX 1 /* HP-UX */
60 #define ELFOSABI_NETBSD 2 /* NetBSD. */
61 -#define ELFOSABI_LINUX 3 /* Linux. */
62 +#define ELFOSABI_GNU 3 /* Object uses GNU ELF extensions. */
63 +#define ELFOSABI_LINUX ELFOSABI_GNU /* Compatibility alias. */
64 #define ELFOSABI_SOLARIS 6 /* Sun Solaris. */
65 #define ELFOSABI_AIX 7 /* IBM AIX. */
66 #define ELFOSABI_IRIX 8 /* SGI Irix. */
67 @@ -142,6 +145,7 @@
68 #define ELFOSABI_TRU64 10 /* Compaq TRU64 UNIX. */
69 #define ELFOSABI_MODESTO 11 /* Novell Modesto. */
70 #define ELFOSABI_OPENBSD 12 /* OpenBSD. */
71 +#define ELFOSABI_ARM_AEABI 64 /* ARM EABI */
72 #define ELFOSABI_ARM 97 /* ARM */
73 #define ELFOSABI_STANDALONE 255 /* Standalone (embedded) application */
74
75 @@ -258,7 +262,9 @@
76 #define EM_ARCA 109 /* Arca RISC Microprocessor */
77 #define EM_UNICORE 110 /* Microprocessor series from PKU-Unity Ltd. */
78 /* and MPRC of Peking University */
79 -#define EM_NUM 111
80 +#define EM_TILEPRO 188 /* Tilera TILEPro */
81 +#define EM_TILEGX 191 /* Tilera TILE-Gx */
82 +#define EM_NUM 192
83
84 /* If it is necessary to assign new unofficial EM_* values, please
85 pick large random numbers (0x8523, 0xa7f2, etc.) to minimize the
86 @@ -339,7 +345,9 @@
87 #define SHT_GROUP 17 /* Section group */
88 #define SHT_SYMTAB_SHNDX 18 /* Extended section indeces */
89 #define SHT_NUM 19 /* Number of defined types. */
90 -#define SHT_LOOS 0x60000000 /* Start OS-specific */
91 +#define SHT_LOOS 0x60000000 /* Start OS-specific. */
92 +#define SHT_GNU_ATTRIBUTES 0x6ffffff5 /* Object attributes. */
93 +#define SHT_GNU_HASH 0x6ffffff6 /* GNU-style hash table. */
94 #define SHT_GNU_LIBLIST 0x6ffffff7 /* Prelink library list */
95 #define SHT_CHECKSUM 0x6ffffff8 /* Checksum for DSO content. */
96 #define SHT_LOSUNW 0x6ffffffa /* Sun-specific low bound. */
97 @@ -432,6 +440,7 @@
98 #define SYMINFO_CURRENT 1
99 #define SYMINFO_NUM 2
100
101 +
102 /* How to extract and insert information held in the st_info field. */
103
104 #define ELF32_ST_BIND(val) (((unsigned char) (val)) >> 4)
105 @@ -450,6 +459,7 @@
106 #define STB_WEAK 2 /* Weak symbol */
107 #define STB_NUM 3 /* Number of defined types. */
108 #define STB_LOOS 10 /* Start of OS-specific */
109 +#define STB_GNU_UNIQUE 10 /* Unique symbol. */
110 #define STB_HIOS 12 /* End of OS-specific */
111 #define STB_LOPROC 13 /* Start of processor-specific */
112 #define STB_HIPROC 15 /* End of processor-specific */
113 @@ -465,16 +475,19 @@
114 #define STT_TLS 6 /* Symbol is thread-local data object*/
115 #define STT_NUM 7 /* Number of defined types. */
116 #define STT_LOOS 10 /* Start of OS-specific */
117 +#define STT_GNU_IFUNC 10 /* Symbol is indirect code object */
118 #define STT_HIOS 12 /* End of OS-specific */
119 #define STT_LOPROC 13 /* Start of processor-specific */
120 #define STT_HIPROC 15 /* End of processor-specific */
121
122 +
123 /* Symbol table indices are found in the hash buckets and chain table
124 of a symbol hash table section. This special index value indicates
125 the end of a chain, meaning no further symbols are found in that bucket. */
126
127 #define STN_UNDEF 0 /* End of a chain. */
128
129 +
130 /* How to extract and insert information held in the st_other field. */
131
132 #define ELF32_ST_VISIBILITY(o) ((o) & 0x03)
133 @@ -488,6 +501,7 @@
134 #define STV_HIDDEN 2 /* Sym unavailable in other modules */
135 #define STV_PROTECTED 3 /* Not preemptible, not exported */
136
137 +
138 /* Relocation table entry without addend (in section of type SHT_REL). */
139
140 typedef struct
141 @@ -559,6 +573,12 @@
142 Elf64_Xword p_align; /* Segment alignment */
143 } Elf64_Phdr;
144
145 +/* Special value for e_phnum. This indicates that the real number of
146 + program headers is too large to fit into e_phnum. Instead the real
147 + value is in the field sh_info of section 0. */
148 +
149 +#define PN_XNUM 0xffff
150 +
151 /* Legal values for p_type (segment type). */
152
153 #define PT_NULL 0 /* Program header table entry unused */
154 @@ -607,12 +627,20 @@
155 #define NT_UTSNAME 15 /* Contains copy of utsname struct */
156 #define NT_LWPSTATUS 16 /* Contains copy of lwpstatus struct */
157 #define NT_LWPSINFO 17 /* Contains copy of lwpinfo struct */
158 -#define NT_PRFPXREG 20 /* Contains copy of fprxregset struct*/
159 +#define NT_PRFPXREG 20 /* Contains copy of fprxregset struct */
160 +#define NT_PRXFPREG 0x46e62b7f /* Contains copy of user_fxsr_struct */
161 +#define NT_PPC_VMX 0x100 /* PowerPC Altivec/VMX registers */
162 +#define NT_PPC_SPE 0x101 /* PowerPC SPE/EVR registers */
163 +#define NT_PPC_VSX 0x102 /* PowerPC VSX registers */
164 +#define NT_386_TLS 0x200 /* i386 TLS slots (struct user_desc) */
165 +#define NT_386_IOPERM 0x201 /* x86 io permission bitmap (1=deny) */
166 +#define NT_X86_XSTATE 0x202 /* x86 extended state using xsave */
167
168 /* Legal values for the note segment descriptor types for object files. */
169
170 #define NT_VERSION 1 /* Contains a version string. */
171
172 +
173 /* Dynamic section entry. */
174
175 typedef struct
176 @@ -704,6 +732,9 @@
177 If any adjustment is made to the ELF object after it has been
178 built these entries will need to be adjusted. */
179 #define DT_ADDRRNGLO 0x6ffffe00
180 +#define DT_GNU_HASH 0x6ffffef5 /* GNU-style hash table. */
181 +#define DT_TLSDESC_PLT 0x6ffffef6
182 +#define DT_TLSDESC_GOT 0x6ffffef7
183 #define DT_GNU_CONFLICT 0x6ffffef8 /* Start of conflict section */
184 #define DT_GNU_LIBLIST 0x6ffffef9 /* Library list */
185 #define DT_CONFIG 0x6ffffefa /* Configuration information. */
186 @@ -714,7 +745,7 @@
187 #define DT_SYMINFO 0x6ffffeff /* Syminfo table. */
188 #define DT_ADDRRNGHI 0x6ffffeff
189 #define DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag)) /* Reverse order! */
190 -#define DT_ADDRNUM 10
191 +#define DT_ADDRNUM 11
192
193 /* The versioning entry types. The next are defined as part of the
194 GNU extension. */
195 @@ -803,6 +834,7 @@
196 entry */
197 } Elf64_Verdef;
198
199 +
200 /* Legal values for vd_version (version revision). */
201 #define VER_DEF_NONE 0 /* No version */
202 #define VER_DEF_CURRENT 1 /* Current version */
203 @@ -834,6 +866,7 @@
204 entry */
205 } Elf64_Verdaux;
206
207 +
208 /* Version dependency section. */
209
210 typedef struct
211 @@ -858,6 +891,7 @@
212 entry */
213 } Elf64_Verneed;
214
215 +
216 /* Legal values for vn_version (version revision). */
217 #define VER_NEED_NONE 0 /* No version */
218 #define VER_NEED_CURRENT 1 /* Current version */
219 @@ -885,9 +919,11 @@
220 entry */
221 } Elf64_Vernaux;
222
223 +
224 /* Legal values for vna_flags. */
225 #define VER_FLG_WEAK 0x2 /* Weak version identifier */
226
227 +
228 /* Auxiliary vector. */
229
230 /* This vector is normally only used by the program interpreter. The
231 @@ -960,6 +996,12 @@
232
233 #define AT_SECURE 23 /* Boolean, was exec setuid-like? */
234
235 +#define AT_BASE_PLATFORM 24 /* String identifying real platforms.*/
236 +
237 +#define AT_RANDOM 25 /* Address of 16 random bytes. */
238 +
239 +#define AT_EXECFN 31 /* Filename of executable. */
240 +
241 /* Pointer to the global system page used for system calls and other
242 nice things. */
243 #define AT_SYSINFO 32
244 @@ -997,11 +1039,13 @@
245 /* Note entries for GNU systems have this name. */
246 #define ELF_NOTE_GNU "GNU"
247
248 +
249 /* Defined types of notes for Solaris. */
250
251 /* Value of descriptor (one word) is desired pagesize for the binary. */
252 #define ELF_NOTE_PAGESIZE_HINT 1
253
254 +
255 /* Defined note types for GNU systems. */
256
257 /* ABI information. The descriptor consists of words:
258 @@ -1010,15 +1054,32 @@
259 word 2: minor version of the ABI
260 word 3: subminor version of the ABI
261 */
262 -#define ELF_NOTE_ABI 1
263 +#define NT_GNU_ABI_TAG 1
264 +#define ELF_NOTE_ABI NT_GNU_ABI_TAG /* Old name. */
265
266 -/* Known OSes. These value can appear in word 0 of an ELF_NOTE_ABI
267 - note section entry. */
268 +/* Known OSes. These values can appear in word 0 of an
269 + NT_GNU_ABI_TAG note section entry. */
270 #define ELF_NOTE_OS_LINUX 0
271 #define ELF_NOTE_OS_GNU 1
272 #define ELF_NOTE_OS_SOLARIS2 2
273 #define ELF_NOTE_OS_FREEBSD 3
274
275 +/* Synthetic hwcap information. The descriptor begins with two words:
276 + word 0: number of entries
277 + word 1: bitmask of enabled entries
278 + Then follow variable-length entries, one byte followed by a
279 + '\0'-terminated hwcap name string. The byte gives the bit
280 + number to test if enabled, (1U << bit) & bitmask. */
281 +#define NT_GNU_HWCAP 2
282 +
283 +/* Build ID bits as generated by ld --build-id.
284 + The descriptor consists of any nonzero number of bytes. */
285 +#define NT_GNU_BUILD_ID 3
286 +
287 +/* Version note generated by GNU gold containing a version string. */
288 +#define NT_GNU_GOLD_VERSION 4
289 +
290 +
291 /* Move records. */
292 typedef struct
293 {
294 @@ -1047,6 +1108,7 @@
295 #define ELF64_M_SIZE(info) ELF32_M_SIZE (info)
296 #define ELF64_M_INFO(sym, size) ELF32_M_INFO (sym, size)
297
298 +
299 /* Motorola 68k specific definitions. */
300
301 /* Values for Elf32_Ehdr.e_flags. */
302 @@ -1077,8 +1139,29 @@
303 #define R_68K_GLOB_DAT 20 /* Create GOT entry */
304 #define R_68K_JMP_SLOT 21 /* Create PLT entry */
305 #define R_68K_RELATIVE 22 /* Adjust by program base */
306 +#define R_68K_TLS_GD32 25 /* 32 bit GOT offset for GD */
307 +#define R_68K_TLS_GD16 26 /* 16 bit GOT offset for GD */
308 +#define R_68K_TLS_GD8 27 /* 8 bit GOT offset for GD */
309 +#define R_68K_TLS_LDM32 28 /* 32 bit GOT offset for LDM */
310 +#define R_68K_TLS_LDM16 29 /* 16 bit GOT offset for LDM */
311 +#define R_68K_TLS_LDM8 30 /* 8 bit GOT offset for LDM */
312 +#define R_68K_TLS_LDO32 31 /* 32 bit module-relative offset */
313 +#define R_68K_TLS_LDO16 32 /* 16 bit module-relative offset */
314 +#define R_68K_TLS_LDO8 33 /* 8 bit module-relative offset */
315 +#define R_68K_TLS_IE32 34 /* 32 bit GOT offset for IE */
316 +#define R_68K_TLS_IE16 35 /* 16 bit GOT offset for IE */
317 +#define R_68K_TLS_IE8 36 /* 8 bit GOT offset for IE */
318 +#define R_68K_TLS_LE32 37 /* 32 bit offset relative to
319 + static TLS block */
320 +#define R_68K_TLS_LE16 38 /* 16 bit offset relative to
321 + static TLS block */
322 +#define R_68K_TLS_LE8 39 /* 8 bit offset relative to
323 + static TLS block */
324 +#define R_68K_TLS_DTPMOD32 40 /* 32 bit module number */
325 +#define R_68K_TLS_DTPREL32 41 /* 32 bit module-relative offset */
326 +#define R_68K_TLS_TPREL32 42 /* 32 bit TP-relative offset */
327 /* Keep this the last entry. */
328 -#define R_68K_NUM 23
329 +#define R_68K_NUM 43
330
331 /* Intel 80386 specific definitions. */
332
333 @@ -1132,8 +1215,18 @@
334 #define R_386_TLS_DTPMOD32 35 /* ID of module containing symbol */
335 #define R_386_TLS_DTPOFF32 36 /* Offset in TLS block */
336 #define R_386_TLS_TPOFF32 37 /* Negated offset in static TLS block */
337 +/* 38? */
338 +#define R_386_TLS_GOTDESC 39 /* GOT offset for TLS descriptor. */
339 +#define R_386_TLS_DESC_CALL 40 /* Marker of call through TLS
340 + descriptor for
341 + relaxation. */
342 +#define R_386_TLS_DESC 41 /* TLS descriptor containing
343 + pointer to code and to
344 + argument, returning the TLS
345 + offset for the symbol. */
346 +#define R_386_IRELATIVE 42 /* Adjust indirectly by program base */
347 /* Keep this the last entry. */
348 -#define R_386_NUM 38
349 +#define R_386_NUM 43
350
351 /* SUN SPARC specific definitions. */
352
353 @@ -1201,6 +1294,7 @@
354 #define R_SPARC_PC_LM22 39 /* Low miggle 22 bits of ... */
355 #define R_SPARC_WDISP16 40 /* PC relative 16 bit shifted */
356 #define R_SPARC_WDISP19 41 /* PC relative 19 bit shifted */
357 +#define R_SPARC_GLOB_JMP 42 /* was part of v9 ABI but was removed */
358 #define R_SPARC_7 43 /* Direct 7 bit */
359 #define R_SPARC_5 44 /* Direct 5 bit */
360 #define R_SPARC_6 45 /* Direct 6 bit */
361 @@ -1238,23 +1332,28 @@
362 #define R_SPARC_TLS_DTPOFF64 77
363 #define R_SPARC_TLS_TPOFF32 78
364 #define R_SPARC_TLS_TPOFF64 79
365 +#define R_SPARC_GOTDATA_HIX22 80
366 +#define R_SPARC_GOTDATA_LOX10 81
367 +#define R_SPARC_GOTDATA_OP_HIX22 82
368 +#define R_SPARC_GOTDATA_OP_LOX10 83
369 +#define R_SPARC_GOTDATA_OP 84
370 +#define R_SPARC_H34 85
371 +#define R_SPARC_SIZE32 86
372 +#define R_SPARC_SIZE64 87
373 +#define R_SPARC_WDISP10 88
374 +#define R_SPARC_JMP_IREL 248
375 +#define R_SPARC_IRELATIVE 249
376 +#define R_SPARC_GNU_VTINHERIT 250
377 +#define R_SPARC_GNU_VTENTRY 251
378 +#define R_SPARC_REV32 252
379 /* Keep this the last entry. */
380 -#define R_SPARC_NUM 80
381 +#define R_SPARC_NUM 253
382
383 /* For Sparc64, legal values for d_tag of Elf64_Dyn. */
384
385 #define DT_SPARC_REGISTER 0x70000001
386 #define DT_SPARC_NUM 2
387
388 -/* Bits present in AT_HWCAP, primarily for Sparc32. */
389 -
390 -#define HWCAP_SPARC_FLUSH 1 /* The cpu supports flush insn. */
391 -#define HWCAP_SPARC_STBAR 2
392 -#define HWCAP_SPARC_SWAP 4
393 -#define HWCAP_SPARC_MULDIV 8
394 -#define HWCAP_SPARC_V9 16 /* The cpu is v9, so v8plus is ok. */
395 -#define HWCAP_SPARC_ULTRA3 32
396 -
397 /* MIPS R3000 specific definitions. */
398
399 /* Legal values for e_flags field of Elf32_Ehdr. */
400 @@ -1349,6 +1448,7 @@
401 #define SHF_MIPS_NAMES 0x02000000
402 #define SHF_MIPS_NODUPE 0x01000000
403
404 +
405 /* Symbol tables. */
406
407 /* MIPS specific values for `st_other'. */
408 @@ -1356,6 +1456,7 @@
409 #define STO_MIPS_INTERNAL 0x1
410 #define STO_MIPS_HIDDEN 0x2
411 #define STO_MIPS_PROTECTED 0x3
412 +#define STO_MIPS_PLT 0x8
413 #define STO_MIPS_SC_ALIGN_UNUSED 0xff
414
415 /* MIPS specific values for `st_info'. */
416 @@ -1501,8 +1602,11 @@
417 #define R_MIPS_TLS_TPREL64 48 /* TP-relative offset, 64 bit */
418 #define R_MIPS_TLS_TPREL_HI16 49 /* TP-relative offset, high 16 bits */
419 #define R_MIPS_TLS_TPREL_LO16 50 /* TP-relative offset, low 16 bits */
420 +#define R_MIPS_GLOB_DAT 51
421 +#define R_MIPS_COPY 126
422 +#define R_MIPS_JUMP_SLOT 127
423 /* Keep this the last entry. */
424 -#define R_MIPS_NUM 51
425 +#define R_MIPS_NUM 128
426
427 /* Legal values for p_type field of Elf32_Phdr. */
428
429 @@ -1568,7 +1672,13 @@
430 #define DT_MIPS_COMPACT_SIZE 0x7000002f /* (O32)Size of compact rel section. */
431 #define DT_MIPS_GP_VALUE 0x70000030 /* GP value for aux GOTs. */
432 #define DT_MIPS_AUX_DYNAMIC 0x70000031 /* Address of aux .dynamic. */
433 -#define DT_MIPS_NUM 0x32
434 +/* The address of .got.plt in an executable using the new non-PIC ABI. */
435 +#define DT_MIPS_PLTGOT 0x70000032
436 +/* The base of the PLT in an executable using the new non-PIC ABI if that
437 + PLT is writable. For a non-writable PLT, this is omitted or has a zero
438 + value. */
439 +#define DT_MIPS_RWPLT 0x70000034
440 +#define DT_MIPS_NUM 0x35
441
442 /* Legal values for DT_MIPS_FLAGS Elf32_Dyn entry. */
443
444 @@ -1609,6 +1719,7 @@
445 Elf64_Word l_flags; /* Flags */
446 } Elf64_Lib;
447
448 +
449 /* Legal values for l_flags. */
450
451 #define LL_NONE 0
452 @@ -1623,6 +1734,7 @@
453
454 typedef Elf32_Addr Elf32_Conflict;
455
456 +
457 /* HPPA specific definitions. */
458
459 /* Legal values for e_flags field of Elf32_Ehdr. */
460 @@ -1696,6 +1808,8 @@
461 #define R_PARISC_LTOFF_FPTR14R 62 /* LT-rel. fct ptr, right 14 bits. */
462 #define R_PARISC_FPTR64 64 /* 64 bits function address. */
463 #define R_PARISC_PLABEL32 65 /* 32 bits function address. */
464 +#define R_PARISC_PLABEL21L 66 /* Left 21 bits of fdesc address. */
465 +#define R_PARISC_PLABEL14R 70 /* Right 14 bits of fdesc address. */
466 #define R_PARISC_PCREL64 72 /* 64 bits PC-rel. address. */
467 #define R_PARISC_PCREL22F 74 /* 22 bits PC-rel. address. */
468 #define R_PARISC_PCREL14WR 75 /* PC-rel. address, right 14 bits. */
469 @@ -1756,6 +1870,26 @@
470 #define R_PARISC_LTOFF_TP16F 229 /* 16 bits LT-TP-rel. address. */
471 #define R_PARISC_LTOFF_TP16WF 230 /* 16 bits LT-TP-rel. address. */
472 #define R_PARISC_LTOFF_TP16DF 231 /* 16 bits LT-TP-rel. address. */
473 +#define R_PARISC_GNU_VTENTRY 232
474 +#define R_PARISC_GNU_VTINHERIT 233
475 +#define R_PARISC_TLS_GD21L 234 /* GD 21-bit left. */
476 +#define R_PARISC_TLS_GD14R 235 /* GD 14-bit right. */
477 +#define R_PARISC_TLS_GDCALL 236 /* GD call to __t_g_a. */
478 +#define R_PARISC_TLS_LDM21L 237 /* LD module 21-bit left. */
479 +#define R_PARISC_TLS_LDM14R 238 /* LD module 14-bit right. */
480 +#define R_PARISC_TLS_LDMCALL 239 /* LD module call to __t_g_a. */
481 +#define R_PARISC_TLS_LDO21L 240 /* LD offset 21-bit left. */
482 +#define R_PARISC_TLS_LDO14R 241 /* LD offset 14-bit right. */
483 +#define R_PARISC_TLS_DTPMOD32 242 /* DTP module 32-bit. */
484 +#define R_PARISC_TLS_DTPMOD64 243 /* DTP module 64-bit. */
485 +#define R_PARISC_TLS_DTPOFF32 244 /* DTP offset 32-bit. */
486 +#define R_PARISC_TLS_DTPOFF64 245 /* DTP offset 32-bit. */
487 +#define R_PARISC_TLS_LE21L R_PARISC_TPREL21L
488 +#define R_PARISC_TLS_LE14R R_PARISC_TPREL14R
489 +#define R_PARISC_TLS_IE21L R_PARISC_LTOFF_TP21L
490 +#define R_PARISC_TLS_IE14R R_PARISC_LTOFF_TP14R
491 +#define R_PARISC_TLS_TPREL32 R_PARISC_TPREL32
492 +#define R_PARISC_TLS_TPREL64 R_PARISC_TPREL64
493 #define R_PARISC_HIRESERVE 255
494
495 /* Legal values for p_type field of Elf32_Phdr/Elf64_Phdr. */
496 @@ -1791,6 +1925,7 @@
497 #define PF_HP_LAZYSWAP 0x04000000
498 #define PF_HP_SBP 0x08000000
499
500 +
501 /* Alpha specific definitions. */
502
503 /* Legal values for e_flags field of Elf64_Ehdr. */
504 @@ -1941,9 +2076,6 @@
505 #define R_PPC_GOT_DTPREL16_HI 93 /* half16* (sym+add)@got@dtprel@h */
506 #define R_PPC_GOT_DTPREL16_HA 94 /* half16* (sym+add)@got@dtprel@ha */
507
508 -/* Keep this the last entry. */
509 -#define R_PPC_NUM 95
510 -
511 /* The remaining relocs are from the Embedded ELF ABI, and are not
512 in the SVR4 ELF ABI. */
513 #define R_PPC_EMB_NADDR32 101
514 @@ -1971,11 +2103,14 @@
515 #define R_PPC_DIAB_RELSDA_HI 184 /* like EMB_RELSDA, but high 16 bit */
516 #define R_PPC_DIAB_RELSDA_HA 185 /* like EMB_RELSDA, adjusted high 16 */
517
518 +/* GNU extension to support local ifunc. */
519 +#define R_PPC_IRELATIVE 248
520 +
521 /* GNU relocs used in PIC code sequences. */
522 -#define R_PPC_REL16 249 /* word32 (sym-.) */
523 -#define R_PPC_REL16_LO 250 /* half16 (sym-.)@l */
524 -#define R_PPC_REL16_HI 251 /* half16 (sym-.)@h */
525 -#define R_PPC_REL16_HA 252 /* half16 (sym-.)@ha */
526 +#define R_PPC_REL16 249 /* half16 (sym+add-.) */
527 +#define R_PPC_REL16_LO 250 /* half16 (sym+add-.)@l */
528 +#define R_PPC_REL16_HI 251 /* half16 (sym+add-.)@h */
529 +#define R_PPC_REL16_HA 252 /* half16 (sym+add-.)@ha */
530
531 /* This is a phony reloc to handle any old fashioned TOC16 references
532 that may still be in object files. */
533 @@ -2097,8 +2232,13 @@
534 #define R_PPC64_DTPREL16_HIGHEST 105 /* half16 (sym+add)@dtprel@highest */
535 #define R_PPC64_DTPREL16_HIGHESTA 106 /* half16 (sym+add)@dtprel@highesta */
536
537 -/* Keep this the last entry. */
538 -#define R_PPC64_NUM 107
539 +/* GNU extension to support local ifunc. */
540 +#define R_PPC64_JMP_IREL 247
541 +#define R_PPC64_IRELATIVE 248
542 +#define R_PPC64_REL16 249 /* half16 (sym+add-.) */
543 +#define R_PPC64_REL16_LO 250 /* half16 (sym+add-.)@l */
544 +#define R_PPC64_REL16_HI 251 /* half16 (sym+add-.)@h */
545 +#define R_PPC64_REL16_HA 252 /* half16 (sym+add-.)@ha */
546
547 /* PowerPC64 specific values for the Dyn d_tag field. */
548 #define DT_PPC64_GLINK (DT_LOPROC + 0)
549 @@ -2106,54 +2246,66 @@
550 #define DT_PPC64_OPDSZ (DT_LOPROC + 2)
551 #define DT_PPC64_NUM 3
552
553 +
554 /* ARM specific declarations */
555
556 /* Processor specific flags for the ELF header e_flags field. */
557 -#define EF_ARM_RELEXEC 0x01
558 -#define EF_ARM_HASENTRY 0x02
559 -#define EF_ARM_INTERWORK 0x04
560 -#define EF_ARM_APCS_26 0x08
561 -#define EF_ARM_APCS_FLOAT 0x10
562 -#define EF_ARM_PIC 0x20
563 -#define EF_ARM_ALIGN8 0x40 /* 8-bit structure alignment is in use */
564 -#define EF_ARM_NEW_ABI 0x80
565 -#define EF_ARM_OLD_ABI 0x100
566 -#define EF_ARM_SOFT_FLOAT 0x200
567 -#define EF_ARM_VFP_FLOAT 0x400
568 -#define EF_ARM_MAVERICK_FLOAT 0x800
569 +#define EF_ARM_RELEXEC 0x01
570 +#define EF_ARM_HASENTRY 0x02
571 +#define EF_ARM_INTERWORK 0x04
572 +#define EF_ARM_APCS_26 0x08
573 +#define EF_ARM_APCS_FLOAT 0x10
574 +#define EF_ARM_PIC 0x20
575 +#define EF_ARM_ALIGN8 0x40 /* 8-bit structure alignment is in use */
576 +#define EF_ARM_NEW_ABI 0x80
577 +#define EF_ARM_OLD_ABI 0x100
578 +#define EF_ARM_SOFT_FLOAT 0x200
579 +#define EF_ARM_VFP_FLOAT 0x400
580 +#define EF_ARM_MAVERICK_FLOAT 0x800
581 +
582
583 /* Other constants defined in the ARM ELF spec. version B-01. */
584 /* NB. These conflict with values defined above. */
585 #define EF_ARM_SYMSARESORTED 0x04
586 -#define EF_ARM_DYNSYMSUSESEGIDX 0x08
587 +#define EF_ARM_DYNSYMSUSESEGIDX 0x08
588 #define EF_ARM_MAPSYMSFIRST 0x10
589 #define EF_ARM_EABIMASK 0XFF000000
590
591 -#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK)
592 -#define EF_ARM_EABI_UNKNOWN 0x00000000
593 -#define EF_ARM_EABI_VER1 0x01000000
594 -#define EF_ARM_EABI_VER2 0x02000000
595 -#define EF_ARM_EABI_VER3 0x03000000
596 -#define EF_ARM_EABI_VER4 0x04000000
597 -#define EF_ARM_EABI_VER5 0x05000000
598 -
599 -/* EI_OSABI values */
600 -#define ELFOSABI_ARM_AEABI 64 /* Contains symbol versioning. */
601 -
602 -/* Additional symbol types for Thumb */
603 -#define STT_ARM_TFUNC 0xd
604 +/* Constants defined in AAELF. */
605 +#define EF_ARM_BE8 0x00800000
606 +#define EF_ARM_LE8 0x00400000
607 +
608 +#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK)
609 +#define EF_ARM_EABI_UNKNOWN 0x00000000
610 +#define EF_ARM_EABI_VER1 0x01000000
611 +#define EF_ARM_EABI_VER2 0x02000000
612 +#define EF_ARM_EABI_VER3 0x03000000
613 +#define EF_ARM_EABI_VER4 0x04000000
614 +#define EF_ARM_EABI_VER5 0x05000000
615 +
616 +/* Additional symbol types for Thumb. */
617 +#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
618 +#define STT_ARM_16BIT STT_HIPROC /* A Thumb label. */
619
620 /* ARM-specific values for sh_flags */
621 -#define SHF_ARM_ENTRYSECT 0x10000000 /* Section contains an entry point */
622 -#define SHF_ARM_COMDEF 0x80000000 /* Section may be multiply defined
623 - in the input to a link step */
624 +#define SHF_ARM_ENTRYSECT 0x10000000 /* Section contains an entry point */
625 +#define SHF_ARM_COMDEF 0x80000000 /* Section may be multiply defined
626 + in the input to a link step. */
627
628 /* ARM-specific program header flags */
629 -#define PF_ARM_SB 0x10000000 /* Segment contains the location
630 - addressed by the static base */
631 +#define PF_ARM_SB 0x10000000 /* Segment contains the location
632 + addressed by the static base. */
633 +#define PF_ARM_PI 0x20000000 /* Position-independent segment. */
634 +#define PF_ARM_ABS 0x40000000 /* Absolute segment. */
635
636 /* Processor specific values for the Phdr p_type field. */
637 -#define PT_ARM_EXIDX 0x70000001 /* .ARM.exidx segment */
638 +#define PT_ARM_EXIDX (PT_LOPROC + 1) /* ARM unwind segment. */
639 +
640 +/* Processor specific values for the Shdr sh_type field. */
641 +#define SHT_ARM_EXIDX (SHT_LOPROC + 1) /* ARM unwind section. */
642 +#define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) /* Preemption details. */
643 +#define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) /* ARM attributes section. */
644 +
645
646 /* ARM relocs. */
647
648 @@ -2170,7 +2322,8 @@
649 #define R_ARM_THM_PC22 10
650 #define R_ARM_THM_PC8 11
651 #define R_ARM_AMP_VCALL9 12
652 -#define R_ARM_SWI24 13
653 +#define R_ARM_SWI24 13 /* Obsolete static relocation. */
654 +#define R_ARM_TLS_DESC 13 /* Dynamic relocation. */
655 #define R_ARM_THM_SWI8 14
656 #define R_ARM_XPC25 15
657 #define R_ARM_THM_XPC22 16
658 @@ -2191,6 +2344,10 @@
659 #define R_ARM_LDR_SBREL_11_0 35
660 #define R_ARM_ALU_SBREL_19_12 36
661 #define R_ARM_ALU_SBREL_27_20 37
662 +#define R_ARM_TLS_GOTDESC 90
663 +#define R_ARM_TLS_CALL 91
664 +#define R_ARM_TLS_DESCSEQ 92
665 +#define R_ARM_THM_TLS_CALL 93
666 #define R_ARM_GNU_VTENTRY 100
667 #define R_ARM_GNU_VTINHERIT 101
668 #define R_ARM_THM_PC11 102 /* thumb unconditional branch */
669 @@ -2205,6 +2362,8 @@
670 static TLS block offset */
671 #define R_ARM_TLS_LE32 108 /* 32 bit offset relative to static
672 TLS block */
673 +#define R_ARM_THM_TLS_DESCSEQ 129
674 +#define R_ARM_IRELATIVE 160
675 #define R_ARM_RXPC25 249
676 #define R_ARM_RSBREL32 250
677 #define R_ARM_THM_RPC22 251
678 @@ -2329,6 +2488,30 @@
679
680 /* SH specific declarations */
681
682 +/* Processor specific flags for the ELF header e_flags field. */
683 +#define EF_SH_MACH_MASK 0x1f
684 +#define EF_SH_UNKNOWN 0x0
685 +#define EF_SH1 0x1
686 +#define EF_SH2 0x2
687 +#define EF_SH3 0x3
688 +#define EF_SH_DSP 0x4
689 +#define EF_SH3_DSP 0x5
690 +#define EF_SH4AL_DSP 0x6
691 +#define EF_SH3E 0x8
692 +#define EF_SH4 0x9
693 +#define EF_SH2E 0xb
694 +#define EF_SH4A 0xc
695 +#define EF_SH2A 0xd
696 +#define EF_SH4_NOFPU 0x10
697 +#define EF_SH4A_NOFPU 0x11
698 +#define EF_SH4_NOMMU_NOFPU 0x12
699 +#define EF_SH2A_NOFPU 0x13
700 +#define EF_SH3_NOMMU 0x14
701 +#define EF_SH2A_SH4_NOFPU 0x15
702 +#define EF_SH2A_SH3_NOFPU 0x16
703 +#define EF_SH2A_SH4 0x17
704 +#define EF_SH2A_SH3E 0x18
705 +
706 /* SH relocs. */
707 #define R_SH_NONE 0
708 #define R_SH_DIR32 1
709 @@ -2370,6 +2553,12 @@
710 /* Keep this the last entry. */
711 #define R_SH_NUM 256
712
713 +/* S/390 specific definitions. */
714 +
715 +/* Valid values for the e_flags field. */
716 +
717 +#define EF_S390_HIGH_GPRS 0x00000001 /* High GPRs kernel facility needed. */
718 +
719 /* Additional s390 relocs */
720
721 #define R_390_NONE 0 /* No reloc. */
722 @@ -2454,6 +2643,7 @@
723 /* Keep this the last entry. */
724 #define R_390_NUM 61
725
726 +
727 /* CRIS relocations. */
728 #define R_CRIS_NONE 0
729 #define R_CRIS_8 1
730 @@ -2478,6 +2668,7 @@
731
732 #define R_CRIS_NUM 20
733
734 +
735 /* AMD x86-64 relocations. */
736 #define R_X86_64_NONE 0 /* No reloc */
737 #define R_X86_64_64 1 /* Direct 64 bit */
738 @@ -2507,8 +2698,28 @@
739 #define R_X86_64_GOTTPOFF 22 /* 32 bit signed PC relative offset
740 to GOT entry for IE symbol */
741 #define R_X86_64_TPOFF32 23 /* Offset in initial TLS block */
742 +#define R_X86_64_PC64 24 /* PC relative 64 bit */
743 +#define R_X86_64_GOTOFF64 25 /* 64 bit offset to GOT */
744 +#define R_X86_64_GOTPC32 26 /* 32 bit signed pc relative
745 + offset to GOT */
746 +#define R_X86_64_GOT64 27 /* 64-bit GOT entry offset */
747 +#define R_X86_64_GOTPCREL64 28 /* 64-bit PC relative offset
748 + to GOT entry */
749 +#define R_X86_64_GOTPC64 29 /* 64-bit PC relative offset to GOT */
750 +#define R_X86_64_GOTPLT64 30 /* like GOT64, says PLT entry needed */
751 +#define R_X86_64_PLTOFF64 31 /* 64-bit GOT relative offset
752 + to PLT entry */
753 +#define R_X86_64_SIZE32 32 /* Size of symbol plus 32-bit addend */
754 +#define R_X86_64_SIZE64 33 /* Size of symbol plus 64-bit addend */
755 +#define R_X86_64_GOTPC32_TLSDESC 34 /* GOT offset for TLS descriptor. */
756 +#define R_X86_64_TLSDESC_CALL 35 /* Marker for call through TLS
757 + descriptor. */
758 +#define R_X86_64_TLSDESC 36 /* TLS descriptor. */
759 +#define R_X86_64_IRELATIVE 37 /* Adjust indirectly by program base */
760 +#define R_X86_64_RELATIVE64 38 /* 64-bit adjust by program base */
761 +
762 +#define R_X86_64_NUM 39
763
764 -#define R_X86_64_NUM 24
765
766 /* AM33 relocations. */
767 #define R_MN10300_NONE 0 /* No reloc. */
768 @@ -2538,6 +2749,7 @@
769
770 #define R_MN10300_NUM 24
771
772 +
773 /* M32R relocs. */
774 #define R_M32R_NONE 0 /* No reloc. */
775 #define R_M32R_16 1 /* Direct 16 bit. */
776 @@ -2593,4 +2805,219 @@
777 #define R_M32R_GOTOFF_LO 64 /* Low 16 bit offset to GOT */
778 #define R_M32R_NUM 256 /* Keep this the last entry. */
779
780 +
781 +/* TILEPro relocations. */
782 +#define R_TILEPRO_NONE 0 /* No reloc */
783 +#define R_TILEPRO_32 1 /* Direct 32 bit */
784 +#define R_TILEPRO_16 2 /* Direct 16 bit */
785 +#define R_TILEPRO_8 3 /* Direct 8 bit */
786 +#define R_TILEPRO_32_PCREL 4 /* PC relative 32 bit */
787 +#define R_TILEPRO_16_PCREL 5 /* PC relative 16 bit */
788 +#define R_TILEPRO_8_PCREL 6 /* PC relative 8 bit */
789 +#define R_TILEPRO_LO16 7 /* Low 16 bit */
790 +#define R_TILEPRO_HI16 8 /* High 16 bit */
791 +#define R_TILEPRO_HA16 9 /* High 16 bit, adjusted */
792 +#define R_TILEPRO_COPY 10 /* Copy relocation */
793 +#define R_TILEPRO_GLOB_DAT 11 /* Create GOT entry */
794 +#define R_TILEPRO_JMP_SLOT 12 /* Create PLT entry */
795 +#define R_TILEPRO_RELATIVE 13 /* Adjust by program base */
796 +#define R_TILEPRO_BROFF_X1 14 /* X1 pipe branch offset */
797 +#define R_TILEPRO_JOFFLONG_X1 15 /* X1 pipe jump offset */
798 +#define R_TILEPRO_JOFFLONG_X1_PLT 16 /* X1 pipe jump offset to PLT */
799 +#define R_TILEPRO_IMM8_X0 17 /* X0 pipe 8-bit */
800 +#define R_TILEPRO_IMM8_Y0 18 /* Y0 pipe 8-bit */
801 +#define R_TILEPRO_IMM8_X1 19 /* X1 pipe 8-bit */
802 +#define R_TILEPRO_IMM8_Y1 20 /* Y1 pipe 8-bit */
803 +#define R_TILEPRO_MT_IMM15_X1 21 /* X1 pipe mtspr */
804 +#define R_TILEPRO_MF_IMM15_X1 22 /* X1 pipe mfspr */
805 +#define R_TILEPRO_IMM16_X0 23 /* X0 pipe 16-bit */
806 +#define R_TILEPRO_IMM16_X1 24 /* X1 pipe 16-bit */
807 +#define R_TILEPRO_IMM16_X0_LO 25 /* X0 pipe low 16-bit */
808 +#define R_TILEPRO_IMM16_X1_LO 26 /* X1 pipe low 16-bit */
809 +#define R_TILEPRO_IMM16_X0_HI 27 /* X0 pipe high 16-bit */
810 +#define R_TILEPRO_IMM16_X1_HI 28 /* X1 pipe high 16-bit */
811 +#define R_TILEPRO_IMM16_X0_HA 29 /* X0 pipe high 16-bit, adjusted */
812 +#define R_TILEPRO_IMM16_X1_HA 30 /* X1 pipe high 16-bit, adjusted */
813 +#define R_TILEPRO_IMM16_X0_PCREL 31 /* X0 pipe PC relative 16 bit */
814 +#define R_TILEPRO_IMM16_X1_PCREL 32 /* X1 pipe PC relative 16 bit */
815 +#define R_TILEPRO_IMM16_X0_LO_PCREL 33 /* X0 pipe PC relative low 16 bit */
816 +#define R_TILEPRO_IMM16_X1_LO_PCREL 34 /* X1 pipe PC relative low 16 bit */
817 +#define R_TILEPRO_IMM16_X0_HI_PCREL 35 /* X0 pipe PC relative high 16 bit */
818 +#define R_TILEPRO_IMM16_X1_HI_PCREL 36 /* X1 pipe PC relative high 16 bit */
819 +#define R_TILEPRO_IMM16_X0_HA_PCREL 37 /* X0 pipe PC relative ha() 16 bit */
820 +#define R_TILEPRO_IMM16_X1_HA_PCREL 38 /* X1 pipe PC relative ha() 16 bit */
821 +#define R_TILEPRO_IMM16_X0_GOT 39 /* X0 pipe 16-bit GOT offset */
822 +#define R_TILEPRO_IMM16_X1_GOT 40 /* X1 pipe 16-bit GOT offset */
823 +#define R_TILEPRO_IMM16_X0_GOT_LO 41 /* X0 pipe low 16-bit GOT offset */
824 +#define R_TILEPRO_IMM16_X1_GOT_LO 42 /* X1 pipe low 16-bit GOT offset */
825 +#define R_TILEPRO_IMM16_X0_GOT_HI 43 /* X0 pipe high 16-bit GOT offset */
826 +#define R_TILEPRO_IMM16_X1_GOT_HI 44 /* X1 pipe high 16-bit GOT offset */
827 +#define R_TILEPRO_IMM16_X0_GOT_HA 45 /* X0 pipe ha() 16-bit GOT offset */
828 +#define R_TILEPRO_IMM16_X1_GOT_HA 46 /* X1 pipe ha() 16-bit GOT offset */
829 +#define R_TILEPRO_MMSTART_X0 47 /* X0 pipe mm "start" */
830 +#define R_TILEPRO_MMEND_X0 48 /* X0 pipe mm "end" */
831 +#define R_TILEPRO_MMSTART_X1 49 /* X1 pipe mm "start" */
832 +#define R_TILEPRO_MMEND_X1 50 /* X1 pipe mm "end" */
833 +#define R_TILEPRO_SHAMT_X0 51 /* X0 pipe shift amount */
834 +#define R_TILEPRO_SHAMT_X1 52 /* X1 pipe shift amount */
835 +#define R_TILEPRO_SHAMT_Y0 53 /* Y0 pipe shift amount */
836 +#define R_TILEPRO_SHAMT_Y1 54 /* Y1 pipe shift amount */
837 +#define R_TILEPRO_DEST_IMM8_X1 55 /* X1 pipe destination 8-bit */
838 +/* Relocs 56-59 are currently not defined. */
839 +#define R_TILEPRO_TLS_GD_CALL 60 /* "jal" for TLS GD */
840 +#define R_TILEPRO_IMM8_X0_TLS_GD_ADD 61 /* X0 pipe "addi" for TLS GD */
841 +#define R_TILEPRO_IMM8_X1_TLS_GD_ADD 62 /* X1 pipe "addi" for TLS GD */
842 +#define R_TILEPRO_IMM8_Y0_TLS_GD_ADD 63 /* Y0 pipe "addi" for TLS GD */
843 +#define R_TILEPRO_IMM8_Y1_TLS_GD_ADD 64 /* Y1 pipe "addi" for TLS GD */
844 +#define R_TILEPRO_TLS_IE_LOAD 65 /* "lw_tls" for TLS IE */
845 +#define R_TILEPRO_IMM16_X0_TLS_GD 66 /* X0 pipe 16-bit TLS GD offset */
846 +#define R_TILEPRO_IMM16_X1_TLS_GD 67 /* X1 pipe 16-bit TLS GD offset */
847 +#define R_TILEPRO_IMM16_X0_TLS_GD_LO 68 /* X0 pipe low 16-bit TLS GD offset */
848 +#define R_TILEPRO_IMM16_X1_TLS_GD_LO 69 /* X1 pipe low 16-bit TLS GD offset */
849 +#define R_TILEPRO_IMM16_X0_TLS_GD_HI 70 /* X0 pipe high 16-bit TLS GD offset */
850 +#define R_TILEPRO_IMM16_X1_TLS_GD_HI 71 /* X1 pipe high 16-bit TLS GD offset */
851 +#define R_TILEPRO_IMM16_X0_TLS_GD_HA 72 /* X0 pipe ha() 16-bit TLS GD offset */
852 +#define R_TILEPRO_IMM16_X1_TLS_GD_HA 73 /* X1 pipe ha() 16-bit TLS GD offset */
853 +#define R_TILEPRO_IMM16_X0_TLS_IE 74 /* X0 pipe 16-bit TLS IE offset */
854 +#define R_TILEPRO_IMM16_X1_TLS_IE 75 /* X1 pipe 16-bit TLS IE offset */
855 +#define R_TILEPRO_IMM16_X0_TLS_IE_LO 76 /* X0 pipe low 16-bit TLS IE offset */
856 +#define R_TILEPRO_IMM16_X1_TLS_IE_LO 77 /* X1 pipe low 16-bit TLS IE offset */
857 +#define R_TILEPRO_IMM16_X0_TLS_IE_HI 78 /* X0 pipe high 16-bit TLS IE offset */
858 +#define R_TILEPRO_IMM16_X1_TLS_IE_HI 79 /* X1 pipe high 16-bit TLS IE offset */
859 +#define R_TILEPRO_IMM16_X0_TLS_IE_HA 80 /* X0 pipe ha() 16-bit TLS IE offset */
860 +#define R_TILEPRO_IMM16_X1_TLS_IE_HA 81 /* X1 pipe ha() 16-bit TLS IE offset */
861 +#define R_TILEPRO_TLS_DTPMOD32 82 /* ID of module containing symbol */
862 +#define R_TILEPRO_TLS_DTPOFF32 83 /* Offset in TLS block */
863 +#define R_TILEPRO_TLS_TPOFF32 84 /* Offset in static TLS block */
864 +#define R_TILEPRO_IMM16_X0_TLS_LE 85 /* X0 pipe 16-bit TLS LE offset */
865 +#define R_TILEPRO_IMM16_X1_TLS_LE 86 /* X1 pipe 16-bit TLS LE offset */
866 +#define R_TILEPRO_IMM16_X0_TLS_LE_LO 87 /* X0 pipe low 16-bit TLS LE offset */
867 +#define R_TILEPRO_IMM16_X1_TLS_LE_LO 88 /* X1 pipe low 16-bit TLS LE offset */
868 +#define R_TILEPRO_IMM16_X0_TLS_LE_HI 89 /* X0 pipe high 16-bit TLS LE offset */
869 +#define R_TILEPRO_IMM16_X1_TLS_LE_HI 90 /* X1 pipe high 16-bit TLS LE offset */
870 +#define R_TILEPRO_IMM16_X0_TLS_LE_HA 91 /* X0 pipe ha() 16-bit TLS LE offset */
871 +#define R_TILEPRO_IMM16_X1_TLS_LE_HA 92 /* X1 pipe ha() 16-bit TLS LE offset */
872 +
873 +#define R_TILEPRO_GNU_VTINHERIT 128 /* GNU C++ vtable hierarchy */
874 +#define R_TILEPRO_GNU_VTENTRY 129 /* GNU C++ vtable member usage */
875 +
876 +#define R_TILEPRO_NUM 130
877 +
878 +
879 +/* TILE-Gx relocations. */
880 +#define R_TILEGX_NONE 0 /* No reloc */
881 +#define R_TILEGX_64 1 /* Direct 64 bit */
882 +#define R_TILEGX_32 2 /* Direct 32 bit */
883 +#define R_TILEGX_16 3 /* Direct 16 bit */
884 +#define R_TILEGX_8 4 /* Direct 8 bit */
885 +#define R_TILEGX_64_PCREL 5 /* PC relative 64 bit */
886 +#define R_TILEGX_32_PCREL 6 /* PC relative 32 bit */
887 +#define R_TILEGX_16_PCREL 7 /* PC relative 16 bit */
888 +#define R_TILEGX_8_PCREL 8 /* PC relative 8 bit */
889 +#define R_TILEGX_HW0 9 /* hword 0 16-bit */
890 +#define R_TILEGX_HW1 10 /* hword 1 16-bit */
891 +#define R_TILEGX_HW2 11 /* hword 2 16-bit */
892 +#define R_TILEGX_HW3 12 /* hword 3 16-bit */
893 +#define R_TILEGX_HW0_LAST 13 /* last hword 0 16-bit */
894 +#define R_TILEGX_HW1_LAST 14 /* last hword 1 16-bit */
895 +#define R_TILEGX_HW2_LAST 15 /* last hword 2 16-bit */
896 +#define R_TILEGX_COPY 16 /* Copy relocation */
897 +#define R_TILEGX_GLOB_DAT 17 /* Create GOT entry */
898 +#define R_TILEGX_JMP_SLOT 18 /* Create PLT entry */
899 +#define R_TILEGX_RELATIVE 19 /* Adjust by program base */
900 +#define R_TILEGX_BROFF_X1 20 /* X1 pipe branch offset */
901 +#define R_TILEGX_JUMPOFF_X1 21 /* X1 pipe jump offset */
902 +#define R_TILEGX_JUMPOFF_X1_PLT 22 /* X1 pipe jump offset to PLT */
903 +#define R_TILEGX_IMM8_X0 23 /* X0 pipe 8-bit */
904 +#define R_TILEGX_IMM8_Y0 24 /* Y0 pipe 8-bit */
905 +#define R_TILEGX_IMM8_X1 25 /* X1 pipe 8-bit */
906 +#define R_TILEGX_IMM8_Y1 26 /* Y1 pipe 8-bit */
907 +#define R_TILEGX_DEST_IMM8_X1 27 /* X1 pipe destination 8-bit */
908 +#define R_TILEGX_MT_IMM14_X1 28 /* X1 pipe mtspr */
909 +#define R_TILEGX_MF_IMM14_X1 29 /* X1 pipe mfspr */
910 +#define R_TILEGX_MMSTART_X0 30 /* X0 pipe mm "start" */
911 +#define R_TILEGX_MMEND_X0 31 /* X0 pipe mm "end" */
912 +#define R_TILEGX_SHAMT_X0 32 /* X0 pipe shift amount */
913 +#define R_TILEGX_SHAMT_X1 33 /* X1 pipe shift amount */
914 +#define R_TILEGX_SHAMT_Y0 34 /* Y0 pipe shift amount */
915 +#define R_TILEGX_SHAMT_Y1 35 /* Y1 pipe shift amount */
916 +#define R_TILEGX_IMM16_X0_HW0 36 /* X0 pipe hword 0 */
917 +#define R_TILEGX_IMM16_X1_HW0 37 /* X1 pipe hword 0 */
918 +#define R_TILEGX_IMM16_X0_HW1 38 /* X0 pipe hword 1 */
919 +#define R_TILEGX_IMM16_X1_HW1 39 /* X1 pipe hword 1 */
920 +#define R_TILEGX_IMM16_X0_HW2 40 /* X0 pipe hword 2 */
921 +#define R_TILEGX_IMM16_X1_HW2 41 /* X1 pipe hword 2 */
922 +#define R_TILEGX_IMM16_X0_HW3 42 /* X0 pipe hword 3 */
923 +#define R_TILEGX_IMM16_X1_HW3 43 /* X1 pipe hword 3 */
924 +#define R_TILEGX_IMM16_X0_HW0_LAST 44 /* X0 pipe last hword 0 */
925 +#define R_TILEGX_IMM16_X1_HW0_LAST 45 /* X1 pipe last hword 0 */
926 +#define R_TILEGX_IMM16_X0_HW1_LAST 46 /* X0 pipe last hword 1 */
927 +#define R_TILEGX_IMM16_X1_HW1_LAST 47 /* X1 pipe last hword 1 */
928 +#define R_TILEGX_IMM16_X0_HW2_LAST 48 /* X0 pipe last hword 2 */
929 +#define R_TILEGX_IMM16_X1_HW2_LAST 49 /* X1 pipe last hword 2 */
930 +#define R_TILEGX_IMM16_X0_HW0_PCREL 50 /* X0 pipe PC relative hword 0 */
931 +#define R_TILEGX_IMM16_X1_HW0_PCREL 51 /* X1 pipe PC relative hword 0 */
932 +#define R_TILEGX_IMM16_X0_HW1_PCREL 52 /* X0 pipe PC relative hword 1 */
933 +#define R_TILEGX_IMM16_X1_HW1_PCREL 53 /* X1 pipe PC relative hword 1 */
934 +#define R_TILEGX_IMM16_X0_HW2_PCREL 54 /* X0 pipe PC relative hword 2 */
935 +#define R_TILEGX_IMM16_X1_HW2_PCREL 55 /* X1 pipe PC relative hword 2 */
936 +#define R_TILEGX_IMM16_X0_HW3_PCREL 56 /* X0 pipe PC relative hword 3 */
937 +#define R_TILEGX_IMM16_X1_HW3_PCREL 57 /* X1 pipe PC relative hword 3 */
938 +#define R_TILEGX_IMM16_X0_HW0_LAST_PCREL 58 /* X0 pipe PC-rel last hword 0 */
939 +#define R_TILEGX_IMM16_X1_HW0_LAST_PCREL 59 /* X1 pipe PC-rel last hword 0 */
940 +#define R_TILEGX_IMM16_X0_HW1_LAST_PCREL 60 /* X0 pipe PC-rel last hword 1 */
941 +#define R_TILEGX_IMM16_X1_HW1_LAST_PCREL 61 /* X1 pipe PC-rel last hword 1 */
942 +#define R_TILEGX_IMM16_X0_HW2_LAST_PCREL 62 /* X0 pipe PC-rel last hword 2 */
943 +#define R_TILEGX_IMM16_X1_HW2_LAST_PCREL 63 /* X1 pipe PC-rel last hword 2 */
944 +#define R_TILEGX_IMM16_X0_HW0_GOT 64 /* X0 pipe hword 0 GOT offset */
945 +#define R_TILEGX_IMM16_X1_HW0_GOT 65 /* X1 pipe hword 0 GOT offset */
946 +/* Relocs 66-71 are currently not defined. */
947 +#define R_TILEGX_IMM16_X0_HW0_LAST_GOT 72 /* X0 pipe last hword 0 GOT offset */
948 +#define R_TILEGX_IMM16_X1_HW0_LAST_GOT 73 /* X1 pipe last hword 0 GOT offset */
949 +#define R_TILEGX_IMM16_X0_HW1_LAST_GOT 74 /* X0 pipe last hword 1 GOT offset */
950 +#define R_TILEGX_IMM16_X1_HW1_LAST_GOT 75 /* X1 pipe last hword 1 GOT offset */
951 +/* Relocs 76-77 are currently not defined. */
952 +#define R_TILEGX_IMM16_X0_HW0_TLS_GD 78 /* X0 pipe hword 0 TLS GD offset */
953 +#define R_TILEGX_IMM16_X1_HW0_TLS_GD 79 /* X1 pipe hword 0 TLS GD offset */
954 +#define R_TILEGX_IMM16_X0_HW0_TLS_LE 80 /* X0 pipe hword 0 TLS LE offset */
955 +#define R_TILEGX_IMM16_X1_HW0_TLS_LE 81 /* X1 pipe hword 0 TLS LE offset */
956 +#define R_TILEGX_IMM16_X0_HW0_LAST_TLS_LE 82 /* X0 pipe last hword 0 LE off */
957 +#define R_TILEGX_IMM16_X1_HW0_LAST_TLS_LE 83 /* X1 pipe last hword 0 LE off */
958 +#define R_TILEGX_IMM16_X0_HW1_LAST_TLS_LE 84 /* X0 pipe last hword 1 LE off */
959 +#define R_TILEGX_IMM16_X1_HW1_LAST_TLS_LE 85 /* X1 pipe last hword 1 LE off */
960 +#define R_TILEGX_IMM16_X0_HW0_LAST_TLS_GD 86 /* X0 pipe last hword 0 GD off */
961 +#define R_TILEGX_IMM16_X1_HW0_LAST_TLS_GD 87 /* X1 pipe last hword 0 GD off */
962 +#define R_TILEGX_IMM16_X0_HW1_LAST_TLS_GD 88 /* X0 pipe last hword 1 GD off */
963 +#define R_TILEGX_IMM16_X1_HW1_LAST_TLS_GD 89 /* X1 pipe last hword 1 GD off */
964 +/* Relocs 90-91 are currently not defined. */
965 +#define R_TILEGX_IMM16_X0_HW0_TLS_IE 92 /* X0 pipe hword 0 TLS IE offset */
966 +#define R_TILEGX_IMM16_X1_HW0_TLS_IE 93 /* X1 pipe hword 0 TLS IE offset */
967 +/* Relocs 94-99 are currently not defined. */
968 +#define R_TILEGX_IMM16_X0_HW0_LAST_TLS_IE 100 /* X0 pipe last hword 0 IE off */
969 +#define R_TILEGX_IMM16_X1_HW0_LAST_TLS_IE 101 /* X1 pipe last hword 0 IE off */
970 +#define R_TILEGX_IMM16_X0_HW1_LAST_TLS_IE 102 /* X0 pipe last hword 1 IE off */
971 +#define R_TILEGX_IMM16_X1_HW1_LAST_TLS_IE 103 /* X1 pipe last hword 1 IE off */
972 +/* Relocs 104-105 are currently not defined. */
973 +#define R_TILEGX_TLS_DTPMOD64 106 /* 64-bit ID of symbol's module */
974 +#define R_TILEGX_TLS_DTPOFF64 107 /* 64-bit offset in TLS block */
975 +#define R_TILEGX_TLS_TPOFF64 108 /* 64-bit offset in static TLS block */
976 +#define R_TILEGX_TLS_DTPMOD32 109 /* 32-bit ID of symbol's module */
977 +#define R_TILEGX_TLS_DTPOFF32 110 /* 32-bit offset in TLS block */
978 +#define R_TILEGX_TLS_TPOFF32 111 /* 32-bit offset in static TLS block */
979 +#define R_TILEGX_TLS_GD_CALL 112 /* "jal" for TLS GD */
980 +#define R_TILEGX_IMM8_X0_TLS_GD_ADD 113 /* X0 pipe "addi" for TLS GD */
981 +#define R_TILEGX_IMM8_X1_TLS_GD_ADD 114 /* X1 pipe "addi" for TLS GD */
982 +#define R_TILEGX_IMM8_Y0_TLS_GD_ADD 115 /* Y0 pipe "addi" for TLS GD */
983 +#define R_TILEGX_IMM8_Y1_TLS_GD_ADD 116 /* Y1 pipe "addi" for TLS GD */
984 +#define R_TILEGX_TLS_IE_LOAD 117 /* "ld_tls" for TLS IE */
985 +#define R_TILEGX_IMM8_X0_TLS_ADD 118 /* X0 pipe "addi" for TLS GD/IE */
986 +#define R_TILEGX_IMM8_X1_TLS_ADD 119 /* X1 pipe "addi" for TLS GD/IE */
987 +#define R_TILEGX_IMM8_Y0_TLS_ADD 120 /* Y0 pipe "addi" for TLS GD/IE */
988 +#define R_TILEGX_IMM8_Y1_TLS_ADD 121 /* Y1 pipe "addi" for TLS GD/IE */
989 +
990 +#define R_TILEGX_GNU_VTINHERIT 128 /* GNU C++ vtable hierarchy */
991 +#define R_TILEGX_GNU_VTENTRY 129 /* GNU C++ vtable member usage */
992 +
993 +#define R_TILEGX_NUM 130
994 +
995 #endif /* elf.h */
996
997
998
999 1.78 pax-utils/paxelf.c
1000
1001 file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/paxelf.c?rev=1.78&view=markup
1002 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/paxelf.c?rev=1.78&content-type=text/plain
1003 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/paxelf.c?r1=1.77&r2=1.78
1004
1005 Index: paxelf.c
1006 ===================================================================
1007 RCS file: /var/cvsroot/gentoo-projects/pax-utils/paxelf.c,v
1008 retrieving revision 1.77
1009 retrieving revision 1.78
1010 diff -u -r1.77 -r1.78
1011 --- paxelf.c 24 Nov 2012 19:53:49 -0000 1.77
1012 +++ paxelf.c 24 Nov 2012 20:16:26 -0000 1.78
1013 @@ -1,7 +1,7 @@
1014 /*
1015 * Copyright 2003-2012 Gentoo Foundation
1016 * Distributed under the terms of the GNU General Public License v2
1017 - * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxelf.c,v 1.77 2012/11/24 19:53:49 vapier Exp $
1018 + * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxelf.c,v 1.78 2012/11/24 20:16:26 vapier Exp $
1019 *
1020 * Copyright 2005-2012 Ned Ludd - <solar@g.o>
1021 * Copyright 2005-2012 Mike Frysinger - <vapier@g.o>
1022 @@ -50,6 +50,7 @@
1023 QUERY(ELFOSABI_SYSV),
1024 QUERY(ELFOSABI_HPUX),
1025 QUERY(ELFOSABI_NETBSD),
1026 + QUERY(ELFOSABI_GNU),
1027 QUERY(ELFOSABI_LINUX),
1028 QUERY(ELFOSABI_SOLARIS),
1029 QUERY(ELFOSABI_AIX),
1030 @@ -58,6 +59,7 @@
1031 QUERY(ELFOSABI_TRU64),
1032 QUERY(ELFOSABI_MODESTO),
1033 QUERY(ELFOSABI_OPENBSD),
1034 + QUERY(ELFOSABI_ARM_AEABI),
1035 QUERY(ELFOSABI_ARM),
1036 QUERY(ELFOSABI_STANDALONE),
1037 { 0, 0 }
1038 @@ -80,10 +82,6 @@
1039 QUERY(ET_EXEC),
1040 QUERY(ET_DYN),
1041 QUERY(ET_CORE),
1042 - QUERY(ET_LOOS),
1043 - QUERY(ET_HIOS),
1044 - QUERY(ET_LOPROC),
1045 - QUERY(ET_HIPROC),
1046 { 0, 0 }
1047 };
1048
1049 @@ -270,6 +268,8 @@
1050 QUERY(EM_ARCA),
1051 QUERY(EM_UNICORE),
1052 QUERY(EM_ALPHA),
1053 + QUERY(EM_TILEPRO),
1054 + QUERY(EM_TILEGX),
1055 { 0, 0 }
1056 };
1057
1058 @@ -345,6 +345,22 @@
1059 QUERY(DT_ENCODING),
1060 QUERY(DT_PREINIT_ARRAY),
1061 QUERY(DT_PREINIT_ARRAYSZ),
1062 + QUERY(DT_GNU_PRELINKED),
1063 + QUERY(DT_GNU_CONFLICTSZ),
1064 + QUERY(DT_GNU_LIBLISTSZ),
1065 + QUERY(DT_CHECKSUM),
1066 + QUERY(DT_PLTPADSZ),
1067 + QUERY(DT_MOVEENT),
1068 + QUERY(DT_MOVESZ),
1069 + QUERY(DT_ADDRRNGLO),
1070 + QUERY(DT_GNU_HASH),
1071 + QUERY(DT_TLSDESC_PLT),
1072 + QUERY(DT_TLSDESC_GOT),
1073 + QUERY(DT_GNU_CONFLICT),
1074 + QUERY(DT_GNU_LIBLIST),
1075 + QUERY(DT_CONFIG),
1076 + QUERY(DT_DEPAUDIT),
1077 + QUERY(DT_AUDIT),
1078 { 0, 0 }
1079 };
1080 const char *get_elfdtype(int type)
1081 @@ -371,22 +387,16 @@
1082 QUERY(SHT_PREINIT_ARRAY),
1083 QUERY(SHT_GROUP),
1084 QUERY(SHT_SYMTAB_SHNDX),
1085 - QUERY(SHT_LOOS),
1086 + QUERY(SHT_GNU_ATTRIBUTES),
1087 + QUERY(SHT_GNU_HASH),
1088 QUERY(SHT_GNU_LIBLIST),
1089 QUERY(SHT_CHECKSUM),
1090 - QUERY(SHT_LOSUNW),
1091 QUERY(SHT_SUNW_move),
1092 QUERY(SHT_SUNW_COMDAT),
1093 QUERY(SHT_SUNW_syminfo),
1094 QUERY(SHT_GNU_verdef),
1095 QUERY(SHT_GNU_verneed),
1096 QUERY(SHT_GNU_versym),
1097 - QUERY(SHT_HISUNW),
1098 - QUERY(SHT_HIOS),
1099 - QUERY(SHT_LOPROC),
1100 - QUERY(SHT_HIPROC),
1101 - QUERY(SHT_LOUSER),
1102 - QUERY(SHT_HIUSER),
1103 { 0, 0 }
1104 };
1105 const char *get_elfshttype(int type)
1106 @@ -401,8 +411,9 @@
1107 QUERY(STT_FUNC),
1108 QUERY(STT_SECTION),
1109 QUERY(STT_FILE),
1110 - QUERY(STT_LOPROC),
1111 - QUERY(STT_HIPROC),
1112 + QUERY(STT_COMMON),
1113 + QUERY(STT_TLS),
1114 + QUERY(STT_GNU_IFUNC),
1115 { 0, 0 }
1116 };
1117 const char *get_elfstttype(int type)
1118 @@ -415,8 +426,7 @@
1119 QUERY(STB_LOCAL),
1120 QUERY(STB_GLOBAL),
1121 QUERY(STB_WEAK),
1122 - QUERY(STB_LOPROC),
1123 - QUERY(STB_HIPROC),
1124 + QUERY(STB_GNU_UNIQUE),
1125 { 0, 0 }
1126 };
1127 const char *get_elfstbtype(int type)
1128 @@ -427,12 +437,10 @@
1129 /* translate elf SHN_ defines */
1130 static pairtype elf_shntypes[] = {
1131 QUERY(SHN_UNDEF),
1132 - QUERY(SHN_LORESERVE),
1133 - QUERY(SHN_LOPROC),
1134 - QUERY(SHN_HIPROC),
1135 + QUERY(SHN_BEFORE),
1136 + QUERY(SHN_AFTER),
1137 QUERY(SHN_ABS),
1138 QUERY(SHN_COMMON),
1139 - QUERY(SHN_HIRESERVE),
1140 { 0, 0 }
1141 };
1142 const char *get_elfshntype(int type)