18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci * ELF register definitions..
48c2ecf20Sopenharmony_ci *
58c2ecf20Sopenharmony_ci * This program is free software; you can redistribute it and/or
68c2ecf20Sopenharmony_ci * modify it under the terms of the GNU General Public License
78c2ecf20Sopenharmony_ci * as published by the Free Software Foundation; either version
88c2ecf20Sopenharmony_ci * 2 of the License, or (at your option) any later version.
98c2ecf20Sopenharmony_ci */
108c2ecf20Sopenharmony_ci#ifndef _UAPI_ASM_POWERPC_ELF_H
118c2ecf20Sopenharmony_ci#define _UAPI_ASM_POWERPC_ELF_H
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci#include <linux/types.h>
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci#include <asm/ptrace.h>
178c2ecf20Sopenharmony_ci#include <asm/cputable.h>
188c2ecf20Sopenharmony_ci#include <asm/auxvec.h>
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci/* PowerPC relocations defined by the ABIs */
218c2ecf20Sopenharmony_ci#define R_PPC_NONE		0
228c2ecf20Sopenharmony_ci#define R_PPC_ADDR32		1	/* 32bit absolute address */
238c2ecf20Sopenharmony_ci#define R_PPC_ADDR24		2	/* 26bit address, 2 bits ignored.  */
248c2ecf20Sopenharmony_ci#define R_PPC_ADDR16		3	/* 16bit absolute address */
258c2ecf20Sopenharmony_ci#define R_PPC_ADDR16_LO		4	/* lower 16bit of absolute address */
268c2ecf20Sopenharmony_ci#define R_PPC_ADDR16_HI		5	/* high 16bit of absolute address */
278c2ecf20Sopenharmony_ci#define R_PPC_ADDR16_HA		6	/* adjusted high 16bit */
288c2ecf20Sopenharmony_ci#define R_PPC_ADDR14		7	/* 16bit address, 2 bits ignored */
298c2ecf20Sopenharmony_ci#define R_PPC_ADDR14_BRTAKEN	8
308c2ecf20Sopenharmony_ci#define R_PPC_ADDR14_BRNTAKEN	9
318c2ecf20Sopenharmony_ci#define R_PPC_REL24		10	/* PC relative 26 bit */
328c2ecf20Sopenharmony_ci#define R_PPC_REL14		11	/* PC relative 16 bit */
338c2ecf20Sopenharmony_ci#define R_PPC_REL14_BRTAKEN	12
348c2ecf20Sopenharmony_ci#define R_PPC_REL14_BRNTAKEN	13
358c2ecf20Sopenharmony_ci#define R_PPC_GOT16		14
368c2ecf20Sopenharmony_ci#define R_PPC_GOT16_LO		15
378c2ecf20Sopenharmony_ci#define R_PPC_GOT16_HI		16
388c2ecf20Sopenharmony_ci#define R_PPC_GOT16_HA		17
398c2ecf20Sopenharmony_ci#define R_PPC_PLTREL24		18
408c2ecf20Sopenharmony_ci#define R_PPC_COPY		19
418c2ecf20Sopenharmony_ci#define R_PPC_GLOB_DAT		20
428c2ecf20Sopenharmony_ci#define R_PPC_JMP_SLOT		21
438c2ecf20Sopenharmony_ci#define R_PPC_RELATIVE		22
448c2ecf20Sopenharmony_ci#define R_PPC_LOCAL24PC		23
458c2ecf20Sopenharmony_ci#define R_PPC_UADDR32		24
468c2ecf20Sopenharmony_ci#define R_PPC_UADDR16		25
478c2ecf20Sopenharmony_ci#define R_PPC_REL32		26
488c2ecf20Sopenharmony_ci#define R_PPC_PLT32		27
498c2ecf20Sopenharmony_ci#define R_PPC_PLTREL32		28
508c2ecf20Sopenharmony_ci#define R_PPC_PLT16_LO		29
518c2ecf20Sopenharmony_ci#define R_PPC_PLT16_HI		30
528c2ecf20Sopenharmony_ci#define R_PPC_PLT16_HA		31
538c2ecf20Sopenharmony_ci#define R_PPC_SDAREL16		32
548c2ecf20Sopenharmony_ci#define R_PPC_SECTOFF		33
558c2ecf20Sopenharmony_ci#define R_PPC_SECTOFF_LO	34
568c2ecf20Sopenharmony_ci#define R_PPC_SECTOFF_HI	35
578c2ecf20Sopenharmony_ci#define R_PPC_SECTOFF_HA	36
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ci/* PowerPC relocations defined for the TLS access ABI.  */
608c2ecf20Sopenharmony_ci#define R_PPC_TLS		67 /* none	(sym+add)@tls */
618c2ecf20Sopenharmony_ci#define R_PPC_DTPMOD32		68 /* word32	(sym+add)@dtpmod */
628c2ecf20Sopenharmony_ci#define R_PPC_TPREL16		69 /* half16*	(sym+add)@tprel */
638c2ecf20Sopenharmony_ci#define R_PPC_TPREL16_LO	70 /* half16	(sym+add)@tprel@l */
648c2ecf20Sopenharmony_ci#define R_PPC_TPREL16_HI	71 /* half16	(sym+add)@tprel@h */
658c2ecf20Sopenharmony_ci#define R_PPC_TPREL16_HA	72 /* half16	(sym+add)@tprel@ha */
668c2ecf20Sopenharmony_ci#define R_PPC_TPREL32		73 /* word32	(sym+add)@tprel */
678c2ecf20Sopenharmony_ci#define R_PPC_DTPREL16		74 /* half16*	(sym+add)@dtprel */
688c2ecf20Sopenharmony_ci#define R_PPC_DTPREL16_LO	75 /* half16	(sym+add)@dtprel@l */
698c2ecf20Sopenharmony_ci#define R_PPC_DTPREL16_HI	76 /* half16	(sym+add)@dtprel@h */
708c2ecf20Sopenharmony_ci#define R_PPC_DTPREL16_HA	77 /* half16	(sym+add)@dtprel@ha */
718c2ecf20Sopenharmony_ci#define R_PPC_DTPREL32		78 /* word32	(sym+add)@dtprel */
728c2ecf20Sopenharmony_ci#define R_PPC_GOT_TLSGD16	79 /* half16*	(sym+add)@got@tlsgd */
738c2ecf20Sopenharmony_ci#define R_PPC_GOT_TLSGD16_LO	80 /* half16	(sym+add)@got@tlsgd@l */
748c2ecf20Sopenharmony_ci#define R_PPC_GOT_TLSGD16_HI	81 /* half16	(sym+add)@got@tlsgd@h */
758c2ecf20Sopenharmony_ci#define R_PPC_GOT_TLSGD16_HA	82 /* half16	(sym+add)@got@tlsgd@ha */
768c2ecf20Sopenharmony_ci#define R_PPC_GOT_TLSLD16	83 /* half16*	(sym+add)@got@tlsld */
778c2ecf20Sopenharmony_ci#define R_PPC_GOT_TLSLD16_LO	84 /* half16	(sym+add)@got@tlsld@l */
788c2ecf20Sopenharmony_ci#define R_PPC_GOT_TLSLD16_HI	85 /* half16	(sym+add)@got@tlsld@h */
798c2ecf20Sopenharmony_ci#define R_PPC_GOT_TLSLD16_HA	86 /* half16	(sym+add)@got@tlsld@ha */
808c2ecf20Sopenharmony_ci#define R_PPC_GOT_TPREL16	87 /* half16*	(sym+add)@got@tprel */
818c2ecf20Sopenharmony_ci#define R_PPC_GOT_TPREL16_LO	88 /* half16	(sym+add)@got@tprel@l */
828c2ecf20Sopenharmony_ci#define R_PPC_GOT_TPREL16_HI	89 /* half16	(sym+add)@got@tprel@h */
838c2ecf20Sopenharmony_ci#define R_PPC_GOT_TPREL16_HA	90 /* half16	(sym+add)@got@tprel@ha */
848c2ecf20Sopenharmony_ci#define R_PPC_GOT_DTPREL16	91 /* half16*	(sym+add)@got@dtprel */
858c2ecf20Sopenharmony_ci#define R_PPC_GOT_DTPREL16_LO	92 /* half16*	(sym+add)@got@dtprel@l */
868c2ecf20Sopenharmony_ci#define R_PPC_GOT_DTPREL16_HI	93 /* half16*	(sym+add)@got@dtprel@h */
878c2ecf20Sopenharmony_ci#define R_PPC_GOT_DTPREL16_HA	94 /* half16*	(sym+add)@got@dtprel@ha */
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ci/* keep this the last entry. */
908c2ecf20Sopenharmony_ci#define R_PPC_NUM		95
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_ci#define ELF_NGREG	48	/* includes nip, msr, lr, etc. */
948c2ecf20Sopenharmony_ci#define ELF_NFPREG	33	/* includes fpscr */
958c2ecf20Sopenharmony_ci#define ELF_NVMX	34	/* includes all vector registers */
968c2ecf20Sopenharmony_ci#define ELF_NVSX	32	/* includes all VSX registers */
978c2ecf20Sopenharmony_ci#define ELF_NTMSPRREG	3	/* include tfhar, tfiar, texasr */
988c2ecf20Sopenharmony_ci#define ELF_NEBB	3	/* includes ebbrr, ebbhr, bescr */
998c2ecf20Sopenharmony_ci#define ELF_NPMU	5	/* includes siar, sdar, sier, mmcr2, mmcr0 */
1008c2ecf20Sopenharmony_ci#define ELF_NPKEY	3	/* includes amr, iamr, uamor */
1018c2ecf20Sopenharmony_ci
1028c2ecf20Sopenharmony_citypedef unsigned long elf_greg_t64;
1038c2ecf20Sopenharmony_citypedef elf_greg_t64 elf_gregset_t64[ELF_NGREG];
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_citypedef unsigned int elf_greg_t32;
1068c2ecf20Sopenharmony_citypedef elf_greg_t32 elf_gregset_t32[ELF_NGREG];
1078c2ecf20Sopenharmony_citypedef elf_gregset_t32 compat_elf_gregset_t;
1088c2ecf20Sopenharmony_ci
1098c2ecf20Sopenharmony_ci/*
1108c2ecf20Sopenharmony_ci * ELF_ARCH, CLASS, and DATA are used to set parameters in the core dumps.
1118c2ecf20Sopenharmony_ci */
1128c2ecf20Sopenharmony_ci#ifdef __powerpc64__
1138c2ecf20Sopenharmony_ci# define ELF_NVRREG32	33	/* includes vscr & vrsave stuffed together */
1148c2ecf20Sopenharmony_ci# define ELF_NVRREG	34	/* includes vscr & vrsave in split vectors */
1158c2ecf20Sopenharmony_ci# define ELF_NVSRHALFREG 32	/* Half the vsx registers */
1168c2ecf20Sopenharmony_ci# define ELF_GREG_TYPE	elf_greg_t64
1178c2ecf20Sopenharmony_ci# define ELF_ARCH	EM_PPC64
1188c2ecf20Sopenharmony_ci# define ELF_CLASS	ELFCLASS64
1198c2ecf20Sopenharmony_citypedef elf_greg_t64 elf_greg_t;
1208c2ecf20Sopenharmony_citypedef elf_gregset_t64 elf_gregset_t;
1218c2ecf20Sopenharmony_ci#else
1228c2ecf20Sopenharmony_ci# define ELF_NEVRREG	34	/* includes acc (as 2) */
1238c2ecf20Sopenharmony_ci# define ELF_NVRREG	33	/* includes vscr */
1248c2ecf20Sopenharmony_ci# define ELF_GREG_TYPE	elf_greg_t32
1258c2ecf20Sopenharmony_ci# define ELF_ARCH	EM_PPC
1268c2ecf20Sopenharmony_ci# define ELF_CLASS	ELFCLASS32
1278c2ecf20Sopenharmony_citypedef elf_greg_t32 elf_greg_t;
1288c2ecf20Sopenharmony_citypedef elf_gregset_t32 elf_gregset_t;
1298c2ecf20Sopenharmony_ci#endif /* __powerpc64__ */
1308c2ecf20Sopenharmony_ci
1318c2ecf20Sopenharmony_ci#ifdef __BIG_ENDIAN__
1328c2ecf20Sopenharmony_ci#define ELF_DATA	ELFDATA2MSB
1338c2ecf20Sopenharmony_ci#else
1348c2ecf20Sopenharmony_ci#define ELF_DATA	ELFDATA2LSB
1358c2ecf20Sopenharmony_ci#endif
1368c2ecf20Sopenharmony_ci
1378c2ecf20Sopenharmony_ci/* Floating point registers */
1388c2ecf20Sopenharmony_citypedef double elf_fpreg_t;
1398c2ecf20Sopenharmony_citypedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
1408c2ecf20Sopenharmony_ci
1418c2ecf20Sopenharmony_ci/* Altivec registers */
1428c2ecf20Sopenharmony_ci/*
1438c2ecf20Sopenharmony_ci * The entries with indexes 0-31 contain the corresponding vector registers.
1448c2ecf20Sopenharmony_ci * The entry with index 32 contains the vscr as the last word (offset 12)
1458c2ecf20Sopenharmony_ci * within the quadword.  This allows the vscr to be stored as either a
1468c2ecf20Sopenharmony_ci * quadword (since it must be copied via a vector register to/from storage)
1478c2ecf20Sopenharmony_ci * or as a word.
1488c2ecf20Sopenharmony_ci *
1498c2ecf20Sopenharmony_ci * 64-bit kernel notes: The entry at index 33 contains the vrsave as the first
1508c2ecf20Sopenharmony_ci * word (offset 0) within the quadword.
1518c2ecf20Sopenharmony_ci *
1528c2ecf20Sopenharmony_ci * This definition of the VMX state is compatible with the current PPC32
1538c2ecf20Sopenharmony_ci * ptrace interface.  This allows signal handling and ptrace to use the same
1548c2ecf20Sopenharmony_ci * structures.  This also simplifies the implementation of a bi-arch
1558c2ecf20Sopenharmony_ci * (combined (32- and 64-bit) gdb.
1568c2ecf20Sopenharmony_ci *
1578c2ecf20Sopenharmony_ci * Note that it's _not_ compatible with 32 bits ucontext which stuffs the
1588c2ecf20Sopenharmony_ci * vrsave along with vscr and so only uses 33 vectors for the register set
1598c2ecf20Sopenharmony_ci */
1608c2ecf20Sopenharmony_citypedef __vector128 elf_vrreg_t;
1618c2ecf20Sopenharmony_citypedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG];
1628c2ecf20Sopenharmony_ci#ifdef __powerpc64__
1638c2ecf20Sopenharmony_citypedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32];
1648c2ecf20Sopenharmony_citypedef elf_fpreg_t elf_vsrreghalf_t32[ELF_NVSRHALFREG];
1658c2ecf20Sopenharmony_ci#endif
1668c2ecf20Sopenharmony_ci
1678c2ecf20Sopenharmony_ci/* PowerPC64 relocations defined by the ABIs */
1688c2ecf20Sopenharmony_ci#define R_PPC64_NONE    R_PPC_NONE
1698c2ecf20Sopenharmony_ci#define R_PPC64_ADDR32  R_PPC_ADDR32  /* 32bit absolute address.  */
1708c2ecf20Sopenharmony_ci#define R_PPC64_ADDR24  R_PPC_ADDR24  /* 26bit address, word aligned.  */
1718c2ecf20Sopenharmony_ci#define R_PPC64_ADDR16  R_PPC_ADDR16  /* 16bit absolute address. */
1728c2ecf20Sopenharmony_ci#define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO /* lower 16bits of abs. address.  */
1738c2ecf20Sopenharmony_ci#define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI /* high 16bits of abs. address. */
1748c2ecf20Sopenharmony_ci#define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA /* adjusted high 16bits.  */
1758c2ecf20Sopenharmony_ci#define R_PPC64_ADDR14 R_PPC_ADDR14   /* 16bit address, word aligned.  */
1768c2ecf20Sopenharmony_ci#define R_PPC64_ADDR14_BRTAKEN  R_PPC_ADDR14_BRTAKEN
1778c2ecf20Sopenharmony_ci#define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN
1788c2ecf20Sopenharmony_ci#define R_PPC64_REL24   R_PPC_REL24 /* PC relative 26 bit, word aligned.  */
1798c2ecf20Sopenharmony_ci#define R_PPC64_REL14   R_PPC_REL14 /* PC relative 16 bit. */
1808c2ecf20Sopenharmony_ci#define R_PPC64_REL14_BRTAKEN   R_PPC_REL14_BRTAKEN
1818c2ecf20Sopenharmony_ci#define R_PPC64_REL14_BRNTAKEN  R_PPC_REL14_BRNTAKEN
1828c2ecf20Sopenharmony_ci#define R_PPC64_GOT16     R_PPC_GOT16
1838c2ecf20Sopenharmony_ci#define R_PPC64_GOT16_LO  R_PPC_GOT16_LO
1848c2ecf20Sopenharmony_ci#define R_PPC64_GOT16_HI  R_PPC_GOT16_HI
1858c2ecf20Sopenharmony_ci#define R_PPC64_GOT16_HA  R_PPC_GOT16_HA
1868c2ecf20Sopenharmony_ci
1878c2ecf20Sopenharmony_ci#define R_PPC64_COPY      R_PPC_COPY
1888c2ecf20Sopenharmony_ci#define R_PPC64_GLOB_DAT  R_PPC_GLOB_DAT
1898c2ecf20Sopenharmony_ci#define R_PPC64_JMP_SLOT  R_PPC_JMP_SLOT
1908c2ecf20Sopenharmony_ci#define R_PPC64_RELATIVE  R_PPC_RELATIVE
1918c2ecf20Sopenharmony_ci
1928c2ecf20Sopenharmony_ci#define R_PPC64_UADDR32   R_PPC_UADDR32
1938c2ecf20Sopenharmony_ci#define R_PPC64_UADDR16   R_PPC_UADDR16
1948c2ecf20Sopenharmony_ci#define R_PPC64_REL32     R_PPC_REL32
1958c2ecf20Sopenharmony_ci#define R_PPC64_PLT32     R_PPC_PLT32
1968c2ecf20Sopenharmony_ci#define R_PPC64_PLTREL32  R_PPC_PLTREL32
1978c2ecf20Sopenharmony_ci#define R_PPC64_PLT16_LO  R_PPC_PLT16_LO
1988c2ecf20Sopenharmony_ci#define R_PPC64_PLT16_HI  R_PPC_PLT16_HI
1998c2ecf20Sopenharmony_ci#define R_PPC64_PLT16_HA  R_PPC_PLT16_HA
2008c2ecf20Sopenharmony_ci
2018c2ecf20Sopenharmony_ci#define R_PPC64_SECTOFF     R_PPC_SECTOFF
2028c2ecf20Sopenharmony_ci#define R_PPC64_SECTOFF_LO  R_PPC_SECTOFF_LO
2038c2ecf20Sopenharmony_ci#define R_PPC64_SECTOFF_HI  R_PPC_SECTOFF_HI
2048c2ecf20Sopenharmony_ci#define R_PPC64_SECTOFF_HA  R_PPC_SECTOFF_HA
2058c2ecf20Sopenharmony_ci#define R_PPC64_ADDR30          37  /* word30 (S + A - P) >> 2.  */
2068c2ecf20Sopenharmony_ci#define R_PPC64_ADDR64          38  /* doubleword64 S + A.  */
2078c2ecf20Sopenharmony_ci#define R_PPC64_ADDR16_HIGHER   39  /* half16 #higher(S + A).  */
2088c2ecf20Sopenharmony_ci#define R_PPC64_ADDR16_HIGHERA  40  /* half16 #highera(S + A).  */
2098c2ecf20Sopenharmony_ci#define R_PPC64_ADDR16_HIGHEST  41  /* half16 #highest(S + A).  */
2108c2ecf20Sopenharmony_ci#define R_PPC64_ADDR16_HIGHESTA 42  /* half16 #highesta(S + A). */
2118c2ecf20Sopenharmony_ci#define R_PPC64_UADDR64     43  /* doubleword64 S + A.  */
2128c2ecf20Sopenharmony_ci#define R_PPC64_REL64       44  /* doubleword64 S + A - P.  */
2138c2ecf20Sopenharmony_ci#define R_PPC64_PLT64       45  /* doubleword64 L + A.  */
2148c2ecf20Sopenharmony_ci#define R_PPC64_PLTREL64    46  /* doubleword64 L + A - P.  */
2158c2ecf20Sopenharmony_ci#define R_PPC64_TOC16       47  /* half16* S + A - .TOC.  */
2168c2ecf20Sopenharmony_ci#define R_PPC64_TOC16_LO    48  /* half16 #lo(S + A - .TOC.).  */
2178c2ecf20Sopenharmony_ci#define R_PPC64_TOC16_HI    49  /* half16 #hi(S + A - .TOC.).  */
2188c2ecf20Sopenharmony_ci#define R_PPC64_TOC16_HA    50  /* half16 #ha(S + A - .TOC.).  */
2198c2ecf20Sopenharmony_ci#define R_PPC64_TOC         51  /* doubleword64 .TOC. */
2208c2ecf20Sopenharmony_ci#define R_PPC64_PLTGOT16    52  /* half16* M + A.  */
2218c2ecf20Sopenharmony_ci#define R_PPC64_PLTGOT16_LO 53  /* half16 #lo(M + A).  */
2228c2ecf20Sopenharmony_ci#define R_PPC64_PLTGOT16_HI 54  /* half16 #hi(M + A).  */
2238c2ecf20Sopenharmony_ci#define R_PPC64_PLTGOT16_HA 55  /* half16 #ha(M + A).  */
2248c2ecf20Sopenharmony_ci
2258c2ecf20Sopenharmony_ci#define R_PPC64_ADDR16_DS      56 /* half16ds* (S + A) >> 2.  */
2268c2ecf20Sopenharmony_ci#define R_PPC64_ADDR16_LO_DS   57 /* half16ds  #lo(S + A) >> 2.  */
2278c2ecf20Sopenharmony_ci#define R_PPC64_GOT16_DS       58 /* half16ds* (G + A) >> 2.  */
2288c2ecf20Sopenharmony_ci#define R_PPC64_GOT16_LO_DS    59 /* half16ds  #lo(G + A) >> 2.  */
2298c2ecf20Sopenharmony_ci#define R_PPC64_PLT16_LO_DS    60 /* half16ds  #lo(L + A) >> 2.  */
2308c2ecf20Sopenharmony_ci#define R_PPC64_SECTOFF_DS     61 /* half16ds* (R + A) >> 2.  */
2318c2ecf20Sopenharmony_ci#define R_PPC64_SECTOFF_LO_DS  62 /* half16ds  #lo(R + A) >> 2.  */
2328c2ecf20Sopenharmony_ci#define R_PPC64_TOC16_DS       63 /* half16ds* (S + A - .TOC.) >> 2.  */
2338c2ecf20Sopenharmony_ci#define R_PPC64_TOC16_LO_DS    64 /* half16ds  #lo(S + A - .TOC.) >> 2.  */
2348c2ecf20Sopenharmony_ci#define R_PPC64_PLTGOT16_DS    65 /* half16ds* (M + A) >> 2.  */
2358c2ecf20Sopenharmony_ci#define R_PPC64_PLTGOT16_LO_DS 66 /* half16ds  #lo(M + A) >> 2.  */
2368c2ecf20Sopenharmony_ci
2378c2ecf20Sopenharmony_ci/* PowerPC64 relocations defined for the TLS access ABI.  */
2388c2ecf20Sopenharmony_ci#define R_PPC64_TLS		67 /* none	(sym+add)@tls */
2398c2ecf20Sopenharmony_ci#define R_PPC64_DTPMOD64	68 /* doubleword64 (sym+add)@dtpmod */
2408c2ecf20Sopenharmony_ci#define R_PPC64_TPREL16		69 /* half16*	(sym+add)@tprel */
2418c2ecf20Sopenharmony_ci#define R_PPC64_TPREL16_LO	70 /* half16	(sym+add)@tprel@l */
2428c2ecf20Sopenharmony_ci#define R_PPC64_TPREL16_HI	71 /* half16	(sym+add)@tprel@h */
2438c2ecf20Sopenharmony_ci#define R_PPC64_TPREL16_HA	72 /* half16	(sym+add)@tprel@ha */
2448c2ecf20Sopenharmony_ci#define R_PPC64_TPREL64		73 /* doubleword64 (sym+add)@tprel */
2458c2ecf20Sopenharmony_ci#define R_PPC64_DTPREL16	74 /* half16*	(sym+add)@dtprel */
2468c2ecf20Sopenharmony_ci#define R_PPC64_DTPREL16_LO	75 /* half16	(sym+add)@dtprel@l */
2478c2ecf20Sopenharmony_ci#define R_PPC64_DTPREL16_HI	76 /* half16	(sym+add)@dtprel@h */
2488c2ecf20Sopenharmony_ci#define R_PPC64_DTPREL16_HA	77 /* half16	(sym+add)@dtprel@ha */
2498c2ecf20Sopenharmony_ci#define R_PPC64_DTPREL64	78 /* doubleword64 (sym+add)@dtprel */
2508c2ecf20Sopenharmony_ci#define R_PPC64_GOT_TLSGD16	79 /* half16*	(sym+add)@got@tlsgd */
2518c2ecf20Sopenharmony_ci#define R_PPC64_GOT_TLSGD16_LO	80 /* half16	(sym+add)@got@tlsgd@l */
2528c2ecf20Sopenharmony_ci#define R_PPC64_GOT_TLSGD16_HI	81 /* half16	(sym+add)@got@tlsgd@h */
2538c2ecf20Sopenharmony_ci#define R_PPC64_GOT_TLSGD16_HA	82 /* half16	(sym+add)@got@tlsgd@ha */
2548c2ecf20Sopenharmony_ci#define R_PPC64_GOT_TLSLD16	83 /* half16*	(sym+add)@got@tlsld */
2558c2ecf20Sopenharmony_ci#define R_PPC64_GOT_TLSLD16_LO	84 /* half16	(sym+add)@got@tlsld@l */
2568c2ecf20Sopenharmony_ci#define R_PPC64_GOT_TLSLD16_HI	85 /* half16	(sym+add)@got@tlsld@h */
2578c2ecf20Sopenharmony_ci#define R_PPC64_GOT_TLSLD16_HA	86 /* half16	(sym+add)@got@tlsld@ha */
2588c2ecf20Sopenharmony_ci#define R_PPC64_GOT_TPREL16_DS	87 /* half16ds*	(sym+add)@got@tprel */
2598c2ecf20Sopenharmony_ci#define R_PPC64_GOT_TPREL16_LO_DS 88 /* half16ds (sym+add)@got@tprel@l */
2608c2ecf20Sopenharmony_ci#define R_PPC64_GOT_TPREL16_HI	89 /* half16	(sym+add)@got@tprel@h */
2618c2ecf20Sopenharmony_ci#define R_PPC64_GOT_TPREL16_HA	90 /* half16	(sym+add)@got@tprel@ha */
2628c2ecf20Sopenharmony_ci#define R_PPC64_GOT_DTPREL16_DS	91 /* half16ds*	(sym+add)@got@dtprel */
2638c2ecf20Sopenharmony_ci#define R_PPC64_GOT_DTPREL16_LO_DS 92 /* half16ds (sym+add)@got@dtprel@l */
2648c2ecf20Sopenharmony_ci#define R_PPC64_GOT_DTPREL16_HI	93 /* half16	(sym+add)@got@dtprel@h */
2658c2ecf20Sopenharmony_ci#define R_PPC64_GOT_DTPREL16_HA	94 /* half16	(sym+add)@got@dtprel@ha */
2668c2ecf20Sopenharmony_ci#define R_PPC64_TPREL16_DS	95 /* half16ds*	(sym+add)@tprel */
2678c2ecf20Sopenharmony_ci#define R_PPC64_TPREL16_LO_DS	96 /* half16ds	(sym+add)@tprel@l */
2688c2ecf20Sopenharmony_ci#define R_PPC64_TPREL16_HIGHER	97 /* half16	(sym+add)@tprel@higher */
2698c2ecf20Sopenharmony_ci#define R_PPC64_TPREL16_HIGHERA	98 /* half16	(sym+add)@tprel@highera */
2708c2ecf20Sopenharmony_ci#define R_PPC64_TPREL16_HIGHEST	99 /* half16	(sym+add)@tprel@highest */
2718c2ecf20Sopenharmony_ci#define R_PPC64_TPREL16_HIGHESTA 100 /* half16	(sym+add)@tprel@highesta */
2728c2ecf20Sopenharmony_ci#define R_PPC64_DTPREL16_DS	101 /* half16ds* (sym+add)@dtprel */
2738c2ecf20Sopenharmony_ci#define R_PPC64_DTPREL16_LO_DS	102 /* half16ds	(sym+add)@dtprel@l */
2748c2ecf20Sopenharmony_ci#define R_PPC64_DTPREL16_HIGHER	103 /* half16	(sym+add)@dtprel@higher */
2758c2ecf20Sopenharmony_ci#define R_PPC64_DTPREL16_HIGHERA 104 /* half16	(sym+add)@dtprel@highera */
2768c2ecf20Sopenharmony_ci#define R_PPC64_DTPREL16_HIGHEST 105 /* half16	(sym+add)@dtprel@highest */
2778c2ecf20Sopenharmony_ci#define R_PPC64_DTPREL16_HIGHESTA 106 /* half16	(sym+add)@dtprel@highesta */
2788c2ecf20Sopenharmony_ci#define R_PPC64_TLSGD		107
2798c2ecf20Sopenharmony_ci#define R_PPC64_TLSLD		108
2808c2ecf20Sopenharmony_ci#define R_PPC64_TOCSAVE		109
2818c2ecf20Sopenharmony_ci
2828c2ecf20Sopenharmony_ci#define R_PPC64_ENTRY		118
2838c2ecf20Sopenharmony_ci
2848c2ecf20Sopenharmony_ci#define R_PPC64_REL16		249
2858c2ecf20Sopenharmony_ci#define R_PPC64_REL16_LO	250
2868c2ecf20Sopenharmony_ci#define R_PPC64_REL16_HI	251
2878c2ecf20Sopenharmony_ci#define R_PPC64_REL16_HA	252
2888c2ecf20Sopenharmony_ci
2898c2ecf20Sopenharmony_ci/* Keep this the last entry.  */
2908c2ecf20Sopenharmony_ci#define R_PPC64_NUM		253
2918c2ecf20Sopenharmony_ci
2928c2ecf20Sopenharmony_ci/* There's actually a third entry here, but it's unused */
2938c2ecf20Sopenharmony_cistruct ppc64_opd_entry
2948c2ecf20Sopenharmony_ci{
2958c2ecf20Sopenharmony_ci	unsigned long funcaddr;
2968c2ecf20Sopenharmony_ci	unsigned long r2;
2978c2ecf20Sopenharmony_ci};
2988c2ecf20Sopenharmony_ci
2998c2ecf20Sopenharmony_ci
3008c2ecf20Sopenharmony_ci#endif /* _UAPI_ASM_POWERPC_ELF_H */
301