Blame view

include/asm-powerpc/elf.h 16.9 KB
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
1
2
  #ifndef _ASM_POWERPC_ELF_H
  #define _ASM_POWERPC_ELF_H
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
3

88ced0314   Arnd Bergmann   [PATCH] powerpc: ...
4
  #ifdef __KERNEL__
8c65b4a60   Tim Schmielau   [PATCH] fix remai...
5
  #include <linux/sched.h>	/* for task_struct */
88ced0314   Arnd Bergmann   [PATCH] powerpc: ...
6
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
7
8
9
  #include <asm/types.h>
  #include <asm/ptrace.h>
  #include <asm/cputable.h>
36d57ac4a   H. J. Lu   [PATCH] auxiliary...
10
  #include <asm/auxvec.h>
637a6ff6c   Olof Johansson   [PATCH] ppc64: Up...
11
  #include <asm/page.h>
8c65b4a60   Tim Schmielau   [PATCH] fix remai...
12
  #include <asm/string.h>
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  
  /* PowerPC relocations defined by the ABIs */
  #define R_PPC_NONE		0
  #define R_PPC_ADDR32		1	/* 32bit absolute address */
  #define R_PPC_ADDR24		2	/* 26bit address, 2 bits ignored.  */
  #define R_PPC_ADDR16		3	/* 16bit absolute address */
  #define R_PPC_ADDR16_LO		4	/* lower 16bit of absolute address */
  #define R_PPC_ADDR16_HI		5	/* high 16bit of absolute address */
  #define R_PPC_ADDR16_HA		6	/* adjusted high 16bit */
  #define R_PPC_ADDR14		7	/* 16bit address, 2 bits ignored */
  #define R_PPC_ADDR14_BRTAKEN	8
  #define R_PPC_ADDR14_BRNTAKEN	9
  #define R_PPC_REL24		10	/* PC relative 26 bit */
  #define R_PPC_REL14		11	/* PC relative 16 bit */
  #define R_PPC_REL14_BRTAKEN	12
  #define R_PPC_REL14_BRNTAKEN	13
  #define R_PPC_GOT16		14
  #define R_PPC_GOT16_LO		15
  #define R_PPC_GOT16_HI		16
  #define R_PPC_GOT16_HA		17
  #define R_PPC_PLTREL24		18
  #define R_PPC_COPY		19
  #define R_PPC_GLOB_DAT		20
  #define R_PPC_JMP_SLOT		21
  #define R_PPC_RELATIVE		22
  #define R_PPC_LOCAL24PC		23
  #define R_PPC_UADDR32		24
  #define R_PPC_UADDR16		25
  #define R_PPC_REL32		26
  #define R_PPC_PLT32		27
  #define R_PPC_PLTREL32		28
  #define R_PPC_PLT16_LO		29
  #define R_PPC_PLT16_HI		30
  #define R_PPC_PLT16_HA		31
  #define R_PPC_SDAREL16		32
  #define R_PPC_SECTOFF		33
  #define R_PPC_SECTOFF_LO	34
  #define R_PPC_SECTOFF_HI	35
  #define R_PPC_SECTOFF_HA	36
  
  /* PowerPC relocations defined for the TLS access ABI.  */
  #define R_PPC_TLS		67 /* none	(sym+add)@tls */
  #define R_PPC_DTPMOD32		68 /* word32	(sym+add)@dtpmod */
  #define R_PPC_TPREL16		69 /* half16*	(sym+add)@tprel */
  #define R_PPC_TPREL16_LO	70 /* half16	(sym+add)@tprel@l */
  #define R_PPC_TPREL16_HI	71 /* half16	(sym+add)@tprel@h */
  #define R_PPC_TPREL16_HA	72 /* half16	(sym+add)@tprel@ha */
  #define R_PPC_TPREL32		73 /* word32	(sym+add)@tprel */
  #define R_PPC_DTPREL16		74 /* half16*	(sym+add)@dtprel */
  #define R_PPC_DTPREL16_LO	75 /* half16	(sym+add)@dtprel@l */
  #define R_PPC_DTPREL16_HI	76 /* half16	(sym+add)@dtprel@h */
  #define R_PPC_DTPREL16_HA	77 /* half16	(sym+add)@dtprel@ha */
  #define R_PPC_DTPREL32		78 /* word32	(sym+add)@dtprel */
  #define R_PPC_GOT_TLSGD16	79 /* half16*	(sym+add)@got@tlsgd */
  #define R_PPC_GOT_TLSGD16_LO	80 /* half16	(sym+add)@got@tlsgd@l */
  #define R_PPC_GOT_TLSGD16_HI	81 /* half16	(sym+add)@got@tlsgd@h */
  #define R_PPC_GOT_TLSGD16_HA	82 /* half16	(sym+add)@got@tlsgd@ha */
  #define R_PPC_GOT_TLSLD16	83 /* half16*	(sym+add)@got@tlsld */
  #define R_PPC_GOT_TLSLD16_LO	84 /* half16	(sym+add)@got@tlsld@l */
  #define R_PPC_GOT_TLSLD16_HI	85 /* half16	(sym+add)@got@tlsld@h */
  #define R_PPC_GOT_TLSLD16_HA	86 /* half16	(sym+add)@got@tlsld@ha */
  #define R_PPC_GOT_TPREL16	87 /* half16*	(sym+add)@got@tprel */
  #define R_PPC_GOT_TPREL16_LO	88 /* half16	(sym+add)@got@tprel@l */
  #define R_PPC_GOT_TPREL16_HI	89 /* half16	(sym+add)@got@tprel@h */
  #define R_PPC_GOT_TPREL16_HA	90 /* half16	(sym+add)@got@tprel@ha */
  #define R_PPC_GOT_DTPREL16	91 /* half16*	(sym+add)@got@dtprel */
  #define R_PPC_GOT_DTPREL16_LO	92 /* half16*	(sym+add)@got@dtprel@l */
  #define R_PPC_GOT_DTPREL16_HI	93 /* half16*	(sym+add)@got@dtprel@h */
  #define R_PPC_GOT_DTPREL16_HA	94 /* half16*	(sym+add)@got@dtprel@ha */
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
82
  /* keep this the last entry. */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
83
84
85
86
87
88
89
90
91
92
  #define R_PPC_NUM		95
  
  /*
   * ELF register definitions..
   *
   * This program is free software; you can redistribute it and/or
   * modify it under the terms of the GNU General Public License
   * as published by the Free Software Foundation; either version
   * 2 of the License, or (at your option) any later version.
   */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
93
94
95
  
  #define ELF_NGREG	48	/* includes nip, msr, lr, etc. */
  #define ELF_NFPREG	33	/* includes fpscr */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
96
97
98
99
100
101
102
103
  
  typedef unsigned long elf_greg_t64;
  typedef elf_greg_t64 elf_gregset_t64[ELF_NGREG];
  
  typedef unsigned int elf_greg_t32;
  typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG];
  
  /*
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
104
   * ELF_ARCH, CLASS, and DATA are used to set parameters in the core dumps.
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
105
   */
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
106
107
108
109
110
111
112
113
114
115
116
117
  #ifdef __powerpc64__
  # define ELF_NVRREG32	33	/* includes vscr & vrsave stuffed together */
  # define ELF_NVRREG	34	/* includes vscr & vrsave in split vectors */
  # define ELF_GREG_TYPE	elf_greg_t64
  #else
  # define ELF_NEVRREG	34	/* includes acc (as 2) */
  # define ELF_NVRREG	33	/* includes vscr */
  # define ELF_GREG_TYPE	elf_greg_t32
  # define ELF_ARCH	EM_PPC
  # define ELF_CLASS	ELFCLASS32
  # define ELF_DATA	ELFDATA2MSB
  #endif /* __powerpc64__ */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
118
119
120
121
122
123
124
125
126
127
128
129
  #ifndef ELF_ARCH
  # define ELF_ARCH	EM_PPC64
  # define ELF_CLASS	ELFCLASS64
  # define ELF_DATA	ELFDATA2MSB
    typedef elf_greg_t64 elf_greg_t;
    typedef elf_gregset_t64 elf_gregset_t;
  # define elf_addr_t unsigned long
  #else
    /* Assumption: ELF_ARCH == EM_PPC and ELF_CLASS == ELFCLASS32 */
    typedef elf_greg_t32 elf_greg_t;
    typedef elf_gregset_t32 elf_gregset_t;
  # define elf_addr_t u32
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
130
  #endif /* ELF_ARCH */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
131

a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
132
  /* Floating point registers */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
133
134
135
136
137
138
139
140
141
  typedef double elf_fpreg_t;
  typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
  
  /* Altivec registers */
  /*
   * The entries with indexes 0-31 contain the corresponding vector registers. 
   * The entry with index 32 contains the vscr as the last word (offset 12) 
   * within the quadword.  This allows the vscr to be stored as either a 
   * quadword (since it must be copied via a vector register to/from storage) 
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
142
143
144
   * or as a word.  
   *
   * 64-bit kernel notes: The entry at index 33 contains the vrsave as the first  
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
145
146
147
148
149
150
151
152
153
154
155
156
   * word (offset 0) within the quadword.
   *
   * This definition of the VMX state is compatible with the current PPC32 
   * ptrace interface.  This allows signal handling and ptrace to use the same 
   * structures.  This also simplifies the implementation of a bi-arch 
   * (combined (32- and 64-bit) gdb.
   *
   * Note that it's _not_ compatible with 32 bits ucontext which stuffs the
   * vrsave along with vscr and so only uses 33 vectors for the register set
   */
  typedef __vector128 elf_vrreg_t;
  typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG];
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
157
  #ifdef __powerpc64__
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
158
  typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32];
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
159
  #endif
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
160
161
162
163
164
165
166
  
  /*
   * This is used to ensure we don't load something for the wrong architecture.
   */
  #define elf_check_arch(x) ((x)->e_machine == ELF_ARCH)
  
  #define USE_ELF_CORE_DUMP
637a6ff6c   Olof Johansson   [PATCH] ppc64: Up...
167
  #define ELF_EXEC_PAGESIZE	PAGE_SIZE
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
168
169
170
171
172
173
174
175
176
177
178
  
  /* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
     use of this is to invoke "./ld.so someprog" to test out a new version of
     the loader.  We need to make sure that it is out of the way of the program
     that it will "exec", and that there is sufficient room for the brk.  */
  
  #define ELF_ET_DYN_BASE         (0x08000000)
  
  #ifdef __KERNEL__
  
  /* Common routine for both 32-bit and 64-bit processes */
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
179
  static inline void ppc_elf_core_copy_regs(elf_gregset_t elf_regs,
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
180
181
  					    struct pt_regs *regs)
  {
30415f6a6   Michael Ellerman   powerpc: Fix rand...
182
  	int i, nregs;
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
183

30415f6a6   Michael Ellerman   powerpc: Fix rand...
184
  	memset((void *)elf_regs, 0, sizeof(elf_gregset_t));
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
185

30415f6a6   Michael Ellerman   powerpc: Fix rand...
186
187
188
189
190
191
  	/* Our registers are always unsigned longs, whether we're a 32 bit
  	 * process or 64 bit, on either a 64 bit or 32 bit kernel.
  	 * Don't use ELF_GREG_TYPE here. */
  	nregs = sizeof(struct pt_regs) / sizeof(unsigned long);
  	if (nregs > ELF_NGREG)
  		nregs = ELF_NGREG;
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
192

30415f6a6   Michael Ellerman   powerpc: Fix rand...
193
194
195
196
197
  	for (i = 0; i < nregs; i++) {
  		/* This will correctly truncate 64 bit registers to 32 bits
  		 * for a 32 bit process on a 64 bit kernel. */
  		elf_regs[i] = (elf_greg_t)((ELF_GREG_TYPE *)regs)[i];
  	}
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
198
  }
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
199
  #define ELF_CORE_COPY_REGS(gregs, regs) ppc_elf_core_copy_regs(gregs, regs);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
200
201
202
203
204
205
  
  static inline int dump_task_regs(struct task_struct *tsk,
  				 elf_gregset_t *elf_regs)
  {
  	struct pt_regs *regs = tsk->thread.regs;
  	if (regs)
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
206
  		ppc_elf_core_copy_regs(*elf_regs, regs);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
207
208
209
210
211
212
213
  
  	return 1;
  }
  #define ELF_CORE_COPY_TASK_REGS(tsk, elf_regs) dump_task_regs(tsk, elf_regs)
  
  extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); 
  #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs)
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
214
  #endif /* __KERNEL__ */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
215

a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
216
  /* ELF_HWCAP yields a mask that user programs can use to figure out what
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
217
218
     instruction set this cpu supports.  This could be done in userspace,
     but it's not easy, and we've already done it here.  */
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
219
  # define ELF_HWCAP	(cur_cpu_spec->cpu_user_features)
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
220
221
222
  
  /* This yields a string that ld.so will use to load implementation
     specific libraries for optimization.  This is more specific in
80f15dc70   Paul Mackerras   powerpc: Provide ...
223
     intent than poking at uname or /proc/cpuinfo.  */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
224

80f15dc70   Paul Mackerras   powerpc: Provide ...
225
  #define ELF_PLATFORM	(cur_cpu_spec->platform)
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
226

80f15dc70   Paul Mackerras   powerpc: Provide ...
227
228
229
230
231
  #ifdef __powerpc64__
  # define ELF_PLAT_INIT(_r, load_addr)	do {	\
  	_r->gpr[2] = load_addr; 		\
  } while (0)
  #endif /* __powerpc64__ */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
232

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
233
  #ifdef __KERNEL__
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
234
235
236
  
  #ifdef __powerpc64__
  # define SET_PERSONALITY(ex, ibcs2)				\
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
237
238
239
240
241
242
243
244
245
  do {								\
  	unsigned long new_flags = 0;				\
  	if ((ex).e_ident[EI_CLASS] == ELFCLASS32)		\
  		new_flags = _TIF_32BIT;				\
  	if ((current_thread_info()->flags & _TIF_32BIT)		\
  	    != new_flags)					\
  		set_thread_flag(TIF_ABI_PENDING);		\
  	else							\
  		clear_thread_flag(TIF_ABI_PENDING);		\
ce10d9790   Paul Mackerras   [PATCH] ppc64: Fi...
246
  	if (personality(current->personality) != PER_LINUX32)	\
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
247
248
  		set_personality(PER_LINUX);			\
  } while (0)
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
249
250
  /*
   * An executable for which elf_read_implies_exec() returns TRUE will
a2f95a5ae   Anton Blanchard   [PATCH] ppc64: no...
251
252
253
254
   * have the READ_IMPLIES_EXEC personality flag set automatically. This
   * is only required to work around bugs in old 32bit toolchains. Since
   * the 64bit ABI has never had these issues dont enable the workaround
   * even if we have an executable stack.
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
255
   */
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
256
  # define elf_read_implies_exec(ex, exec_stk) (test_thread_flag(TIF_32BIT) ? \
a2f95a5ae   Anton Blanchard   [PATCH] ppc64: no...
257
  		(exec_stk != EXSTACK_DISABLE_X) : 0)
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
258
259
260
  #else 
  # define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX)
  #endif /* __powerpc64__ */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
261

a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
262
  #endif /* __KERNEL__ */
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
263

1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
264
265
266
  extern int dcache_bsize;
  extern int icache_bsize;
  extern int ucache_bsize;
a7f290dad   Benjamin Herrenschmidt   [PATCH] powerpc: ...
267
268
  /* vDSO has arch_setup_additional_pages */
  #define ARCH_HAS_SETUP_ADDITIONAL_PAGES
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
269
  struct linux_binprm;
a7f290dad   Benjamin Herrenschmidt   [PATCH] powerpc: ...
270
271
  extern int arch_setup_additional_pages(struct linux_binprm *bprm,
  				       int executable_stack);
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
272
  #define VDSO_AUX_ENT(a,b) NEW_AUX_ENT(a,b);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
  
  /*
   * The requirements here are:
   * - keep the final alignment of sp (sp & 0xf)
   * - make sure the 32-bit value at the first 16 byte aligned position of
   *   AUXV is greater than 16 for glibc compatibility.
   *   AT_IGNOREPPC is used for that.
   * - for compatibility with glibc ARCH_DLINFO must always be defined on PPC,
   *   even if DLINFO_ARCH_ITEMS goes to zero or is undefined.
   */
  #define ARCH_DLINFO							\
  do {									\
  	/* Handle glibc compatibility. */				\
  	NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC);			\
  	NEW_AUX_ENT(AT_IGNOREPPC, AT_IGNOREPPC);			\
  	/* Cache size items */						\
  	NEW_AUX_ENT(AT_DCACHEBSIZE, dcache_bsize);			\
  	NEW_AUX_ENT(AT_ICACHEBSIZE, icache_bsize);			\
  	NEW_AUX_ENT(AT_UCACHEBSIZE, ucache_bsize);			\
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
292
293
  	VDSO_AUX_ENT(AT_SYSINFO_EHDR, current->thread.vdso_base)	\
  } while (0)
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
  
  /* PowerPC64 relocations defined by the ABIs */
  #define R_PPC64_NONE    R_PPC_NONE
  #define R_PPC64_ADDR32  R_PPC_ADDR32  /* 32bit absolute address.  */
  #define R_PPC64_ADDR24  R_PPC_ADDR24  /* 26bit address, word aligned.  */
  #define R_PPC64_ADDR16  R_PPC_ADDR16  /* 16bit absolute address. */
  #define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO /* lower 16bits of abs. address.  */
  #define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI /* high 16bits of abs. address. */
  #define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA /* adjusted high 16bits.  */
  #define R_PPC64_ADDR14 R_PPC_ADDR14   /* 16bit address, word aligned.  */
  #define R_PPC64_ADDR14_BRTAKEN  R_PPC_ADDR14_BRTAKEN
  #define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN
  #define R_PPC64_REL24   R_PPC_REL24 /* PC relative 26 bit, word aligned.  */
  #define R_PPC64_REL14   R_PPC_REL14 /* PC relative 16 bit. */
  #define R_PPC64_REL14_BRTAKEN   R_PPC_REL14_BRTAKEN
  #define R_PPC64_REL14_BRNTAKEN  R_PPC_REL14_BRNTAKEN
  #define R_PPC64_GOT16     R_PPC_GOT16
  #define R_PPC64_GOT16_LO  R_PPC_GOT16_LO
  #define R_PPC64_GOT16_HI  R_PPC_GOT16_HI
  #define R_PPC64_GOT16_HA  R_PPC_GOT16_HA
  
  #define R_PPC64_COPY      R_PPC_COPY
  #define R_PPC64_GLOB_DAT  R_PPC_GLOB_DAT
  #define R_PPC64_JMP_SLOT  R_PPC_JMP_SLOT
  #define R_PPC64_RELATIVE  R_PPC_RELATIVE
  
  #define R_PPC64_UADDR32   R_PPC_UADDR32
  #define R_PPC64_UADDR16   R_PPC_UADDR16
  #define R_PPC64_REL32     R_PPC_REL32
  #define R_PPC64_PLT32     R_PPC_PLT32
  #define R_PPC64_PLTREL32  R_PPC_PLTREL32
  #define R_PPC64_PLT16_LO  R_PPC_PLT16_LO
  #define R_PPC64_PLT16_HI  R_PPC_PLT16_HI
  #define R_PPC64_PLT16_HA  R_PPC_PLT16_HA
  
  #define R_PPC64_SECTOFF     R_PPC_SECTOFF
  #define R_PPC64_SECTOFF_LO  R_PPC_SECTOFF_LO
  #define R_PPC64_SECTOFF_HI  R_PPC_SECTOFF_HI
  #define R_PPC64_SECTOFF_HA  R_PPC_SECTOFF_HA
  #define R_PPC64_ADDR30          37  /* word30 (S + A - P) >> 2.  */
  #define R_PPC64_ADDR64          38  /* doubleword64 S + A.  */
  #define R_PPC64_ADDR16_HIGHER   39  /* half16 #higher(S + A).  */
  #define R_PPC64_ADDR16_HIGHERA  40  /* half16 #highera(S + A).  */
  #define R_PPC64_ADDR16_HIGHEST  41  /* half16 #highest(S + A).  */
  #define R_PPC64_ADDR16_HIGHESTA 42  /* half16 #highesta(S + A). */
  #define R_PPC64_UADDR64     43  /* doubleword64 S + A.  */
  #define R_PPC64_REL64       44  /* doubleword64 S + A - P.  */
  #define R_PPC64_PLT64       45  /* doubleword64 L + A.  */
  #define R_PPC64_PLTREL64    46  /* doubleword64 L + A - P.  */
  #define R_PPC64_TOC16       47  /* half16* S + A - .TOC.  */
  #define R_PPC64_TOC16_LO    48  /* half16 #lo(S + A - .TOC.).  */
  #define R_PPC64_TOC16_HI    49  /* half16 #hi(S + A - .TOC.).  */
  #define R_PPC64_TOC16_HA    50  /* half16 #ha(S + A - .TOC.).  */
  #define R_PPC64_TOC         51  /* doubleword64 .TOC. */
  #define R_PPC64_PLTGOT16    52  /* half16* M + A.  */
  #define R_PPC64_PLTGOT16_LO 53  /* half16 #lo(M + A).  */
  #define R_PPC64_PLTGOT16_HI 54  /* half16 #hi(M + A).  */
  #define R_PPC64_PLTGOT16_HA 55  /* half16 #ha(M + A).  */
  
  #define R_PPC64_ADDR16_DS      56 /* half16ds* (S + A) >> 2.  */
  #define R_PPC64_ADDR16_LO_DS   57 /* half16ds  #lo(S + A) >> 2.  */
  #define R_PPC64_GOT16_DS       58 /* half16ds* (G + A) >> 2.  */
  #define R_PPC64_GOT16_LO_DS    59 /* half16ds  #lo(G + A) >> 2.  */
  #define R_PPC64_PLT16_LO_DS    60 /* half16ds  #lo(L + A) >> 2.  */
  #define R_PPC64_SECTOFF_DS     61 /* half16ds* (R + A) >> 2.  */
  #define R_PPC64_SECTOFF_LO_DS  62 /* half16ds  #lo(R + A) >> 2.  */
  #define R_PPC64_TOC16_DS       63 /* half16ds* (S + A - .TOC.) >> 2.  */
  #define R_PPC64_TOC16_LO_DS    64 /* half16ds  #lo(S + A - .TOC.) >> 2.  */
  #define R_PPC64_PLTGOT16_DS    65 /* half16ds* (M + A) >> 2.  */
  #define R_PPC64_PLTGOT16_LO_DS 66 /* half16ds  #lo(M + A) >> 2.  */
  
  /* PowerPC64 relocations defined for the TLS access ABI.  */
  #define R_PPC64_TLS		67 /* none	(sym+add)@tls */
  #define R_PPC64_DTPMOD64	68 /* doubleword64 (sym+add)@dtpmod */
  #define R_PPC64_TPREL16		69 /* half16*	(sym+add)@tprel */
  #define R_PPC64_TPREL16_LO	70 /* half16	(sym+add)@tprel@l */
  #define R_PPC64_TPREL16_HI	71 /* half16	(sym+add)@tprel@h */
  #define R_PPC64_TPREL16_HA	72 /* half16	(sym+add)@tprel@ha */
  #define R_PPC64_TPREL64		73 /* doubleword64 (sym+add)@tprel */
  #define R_PPC64_DTPREL16	74 /* half16*	(sym+add)@dtprel */
  #define R_PPC64_DTPREL16_LO	75 /* half16	(sym+add)@dtprel@l */
  #define R_PPC64_DTPREL16_HI	76 /* half16	(sym+add)@dtprel@h */
  #define R_PPC64_DTPREL16_HA	77 /* half16	(sym+add)@dtprel@ha */
  #define R_PPC64_DTPREL64	78 /* doubleword64 (sym+add)@dtprel */
  #define R_PPC64_GOT_TLSGD16	79 /* half16*	(sym+add)@got@tlsgd */
  #define R_PPC64_GOT_TLSGD16_LO	80 /* half16	(sym+add)@got@tlsgd@l */
  #define R_PPC64_GOT_TLSGD16_HI	81 /* half16	(sym+add)@got@tlsgd@h */
  #define R_PPC64_GOT_TLSGD16_HA	82 /* half16	(sym+add)@got@tlsgd@ha */
  #define R_PPC64_GOT_TLSLD16	83 /* half16*	(sym+add)@got@tlsld */
  #define R_PPC64_GOT_TLSLD16_LO	84 /* half16	(sym+add)@got@tlsld@l */
  #define R_PPC64_GOT_TLSLD16_HI	85 /* half16	(sym+add)@got@tlsld@h */
  #define R_PPC64_GOT_TLSLD16_HA	86 /* half16	(sym+add)@got@tlsld@ha */
  #define R_PPC64_GOT_TPREL16_DS	87 /* half16ds*	(sym+add)@got@tprel */
  #define R_PPC64_GOT_TPREL16_LO_DS 88 /* half16ds (sym+add)@got@tprel@l */
  #define R_PPC64_GOT_TPREL16_HI	89 /* half16	(sym+add)@got@tprel@h */
  #define R_PPC64_GOT_TPREL16_HA	90 /* half16	(sym+add)@got@tprel@ha */
  #define R_PPC64_GOT_DTPREL16_DS	91 /* half16ds*	(sym+add)@got@dtprel */
  #define R_PPC64_GOT_DTPREL16_LO_DS 92 /* half16ds (sym+add)@got@dtprel@l */
  #define R_PPC64_GOT_DTPREL16_HI	93 /* half16	(sym+add)@got@dtprel@h */
  #define R_PPC64_GOT_DTPREL16_HA	94 /* half16	(sym+add)@got@dtprel@ha */
  #define R_PPC64_TPREL16_DS	95 /* half16ds*	(sym+add)@tprel */
  #define R_PPC64_TPREL16_LO_DS	96 /* half16ds	(sym+add)@tprel@l */
  #define R_PPC64_TPREL16_HIGHER	97 /* half16	(sym+add)@tprel@higher */
  #define R_PPC64_TPREL16_HIGHERA	98 /* half16	(sym+add)@tprel@highera */
  #define R_PPC64_TPREL16_HIGHEST	99 /* half16	(sym+add)@tprel@highest */
  #define R_PPC64_TPREL16_HIGHESTA 100 /* half16	(sym+add)@tprel@highesta */
  #define R_PPC64_DTPREL16_DS	101 /* half16ds* (sym+add)@dtprel */
  #define R_PPC64_DTPREL16_LO_DS	102 /* half16ds	(sym+add)@dtprel@l */
  #define R_PPC64_DTPREL16_HIGHER	103 /* half16	(sym+add)@dtprel@higher */
  #define R_PPC64_DTPREL16_HIGHERA 104 /* half16	(sym+add)@dtprel@highera */
  #define R_PPC64_DTPREL16_HIGHEST 105 /* half16	(sym+add)@dtprel@highest */
  #define R_PPC64_DTPREL16_HIGHESTA 106 /* half16	(sym+add)@dtprel@highesta */
  
  /* Keep this the last entry.  */
  #define R_PPC64_NUM		107
a99eb2ef4   Becky Bruce   [PATCH] powerpc: ...
409
  #endif /* _ASM_POWERPC_ELF_H */