xref: /netbsd-src/external/gpl3/gdb/dist/include/elf/arm.h (revision e663ba6e3a60083e70de702e9d54bf486a57b6a7)
198b9484cSchristos /* ARM ELF support for BFD.
2*e663ba6eSchristos    Copyright (C) 1998-2024 Free Software Foundation, Inc.
398b9484cSchristos 
498b9484cSchristos    This file is part of BFD, the Binary File Descriptor library.
598b9484cSchristos 
698b9484cSchristos    This program is free software; you can redistribute it and/or modify
798b9484cSchristos    it under the terms of the GNU General Public License as published by
898b9484cSchristos    the Free Software Foundation; either version 3 of the License, or
998b9484cSchristos    (at your option) any later version.
1098b9484cSchristos 
1198b9484cSchristos    This program is distributed in the hope that it will be useful,
1298b9484cSchristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
1398b9484cSchristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1498b9484cSchristos    GNU General Public License for more details.
1598b9484cSchristos 
1698b9484cSchristos    You should have received a copy of the GNU General Public License
1798b9484cSchristos    along with this program; if not, write to the Free Software Foundation,
1898b9484cSchristos    Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
1998b9484cSchristos 
2098b9484cSchristos #ifndef _ELF_ARM_H
2198b9484cSchristos #define _ELF_ARM_H
2298b9484cSchristos 
2398b9484cSchristos #include "elf/reloc-macros.h"
2498b9484cSchristos 
2598b9484cSchristos /* Processor specific flags for the ELF header e_flags field.  */
264559860eSchristos 
274559860eSchristos /* Old ABI (ie GNU pre EABI).  These are deprecated.  */
2898b9484cSchristos #define EF_ARM_RELEXEC     0x01
2998b9484cSchristos #define EF_ARM_INTERWORK   0x04
3098b9484cSchristos #define EF_ARM_APCS_26     0x08
3198b9484cSchristos #define EF_ARM_APCS_FLOAT  0x10
3298b9484cSchristos #define EF_ARM_PIC         0x20
3398b9484cSchristos #define EF_ARM_ALIGN8	   0x40		/* 8-bit structure alignment is in use.  */
3498b9484cSchristos #define EF_ARM_NEW_ABI     0x80
3598b9484cSchristos #define EF_ARM_OLD_ABI     0x100
3698b9484cSchristos #define EF_ARM_SOFT_FLOAT  0x200
3798b9484cSchristos #define EF_ARM_VFP_FLOAT   0x400
38*e663ba6eSchristos /* Removed, was EF_ARM_MAVERICK_FLOAT 0x800  */
3998b9484cSchristos 
4098b9484cSchristos /* Frame unwind information */
4198b9484cSchristos #define PT_ARM_EXIDX (PT_LOPROC + 1)
4298b9484cSchristos 
434559860eSchristos /* Old ARM ELF spec. version B-01.  Mostly deprecated.  */
4498b9484cSchristos #define EF_ARM_SYMSARESORTED 0x04	/* NB conflicts with EF_INTERWORK.  */
4598b9484cSchristos #define EF_ARM_DYNSYMSUSESEGIDX 0x08	/* NB conflicts with EF_APCS26.  */
4698b9484cSchristos #define EF_ARM_MAPSYMSFIRST 0x10	/* NB conflicts with EF_APCS_FLOAT.  */
4798b9484cSchristos 
484559860eSchristos /* New constants defined in the ARM ELF spec. version XXX (AAELF).
49a2e2270fSchristos    Only valid in conjunction with EF_ARM_EABI_VER5. */
50a2e2270fSchristos #define EF_ARM_ABI_FLOAT_SOFT 0x200	/* NB conflicts with EF_ARM_SOFT_FLOAT.  */
51a2e2270fSchristos #define EF_ARM_ABI_FLOAT_HARD 0x400	/* NB conflicts with EF_ARM_VFP_FLOAT.  */
52a2e2270fSchristos 
5398b9484cSchristos /* Constants defined in AAELF.  */
5498b9484cSchristos #define EF_ARM_BE8	    0x00800000
5598b9484cSchristos #define EF_ARM_LE8	    0x00400000
5698b9484cSchristos 
574559860eSchristos #define EF_ARM_EABIMASK      0xFF000000
5898b9484cSchristos #define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK)
5998b9484cSchristos #define EF_ARM_EABI_UNKNOWN  0x00000000
6098b9484cSchristos #define EF_ARM_EABI_VER1     0x01000000
6198b9484cSchristos #define EF_ARM_EABI_VER2     0x02000000
6298b9484cSchristos #define EF_ARM_EABI_VER3     0x03000000
6398b9484cSchristos #define EF_ARM_EABI_VER4     0x04000000
6498b9484cSchristos #define EF_ARM_EABI_VER5     0x05000000
6598b9484cSchristos 
6698b9484cSchristos /* Local aliases for some flags to match names used by COFF port.  */
6798b9484cSchristos #define F_INTERWORK	   EF_ARM_INTERWORK
6898b9484cSchristos #define F_APCS26	   EF_ARM_APCS_26
6998b9484cSchristos #define F_APCS_FLOAT	   EF_ARM_APCS_FLOAT
7098b9484cSchristos #define F_PIC              EF_ARM_PIC
7198b9484cSchristos #define F_SOFT_FLOAT	   EF_ARM_SOFT_FLOAT
7298b9484cSchristos #define F_VFP_FLOAT	   EF_ARM_VFP_FLOAT
7398b9484cSchristos 
7498b9484cSchristos /* Additional symbol types for Thumb.  */
7598b9484cSchristos #define STT_ARM_TFUNC      STT_LOPROC   /* A Thumb function.  */
7698b9484cSchristos #define STT_ARM_16BIT      STT_HIPROC   /* A Thumb label.  */
7798b9484cSchristos 
7898b9484cSchristos /* Additional section types.  */
7998b9484cSchristos #define SHT_ARM_EXIDX	       0x70000001	/* Section holds ARM unwind info.  */
8098b9484cSchristos #define SHT_ARM_PREEMPTMAP     0x70000002	/* Section pre-emption details.  */
8198b9484cSchristos #define SHT_ARM_ATTRIBUTES     0x70000003	/* Section holds attributes.  */
8298b9484cSchristos #define SHT_ARM_DEBUGOVERLAY   0x70000004	/* Section holds overlay debug info.  */
8398b9484cSchristos #define SHT_ARM_OVERLAYSECTION 0x70000005	/* Section holds GDB and overlay integration info.  */
8498b9484cSchristos 
8598b9484cSchristos /* ARM-specific values for sh_flags.  */
8698b9484cSchristos #define SHF_ENTRYSECT      0x10000000   /* Section contains an entry point.  */
87ba340e45Schristos #define SHF_ARM_PURECODE   0x20000000   /* Section contains only code and no data.  */
8898b9484cSchristos #define SHF_COMDEF         0x80000000   /* Section may be multiply defined in the input to a link step.  */
8998b9484cSchristos 
9098b9484cSchristos /* ARM-specific program header flags.  */
9198b9484cSchristos #define PF_ARM_SB          0x10000000   /* Segment contains the location addressed by the static base.  */
9298b9484cSchristos #define PF_ARM_PI          0x20000000   /* Segment is position-independent.  */
9398b9484cSchristos #define PF_ARM_ABS         0x40000000   /* Segment must be loaded at its base address.  */
9498b9484cSchristos 
9598b9484cSchristos /* Values for the Tag_CPU_arch EABI attribute.  */
9698b9484cSchristos #define TAG_CPU_ARCH_PRE_V4	0
9798b9484cSchristos #define TAG_CPU_ARCH_V4		1
9898b9484cSchristos #define TAG_CPU_ARCH_V4T	2
9998b9484cSchristos #define TAG_CPU_ARCH_V5T	3
10098b9484cSchristos #define TAG_CPU_ARCH_V5TE	4
10198b9484cSchristos #define TAG_CPU_ARCH_V5TEJ	5
10298b9484cSchristos #define TAG_CPU_ARCH_V6		6
10398b9484cSchristos #define TAG_CPU_ARCH_V6KZ	7
10498b9484cSchristos #define TAG_CPU_ARCH_V6T2	8
10598b9484cSchristos #define TAG_CPU_ARCH_V6K	9
10698b9484cSchristos #define TAG_CPU_ARCH_V7		10
10798b9484cSchristos #define TAG_CPU_ARCH_V6_M	11
10898b9484cSchristos #define TAG_CPU_ARCH_V6S_M	12
10998b9484cSchristos #define TAG_CPU_ARCH_V7E_M	13
110a2e2270fSchristos #define TAG_CPU_ARCH_V8		14
1114559860eSchristos #define TAG_CPU_ARCH_V8R	15
112ba340e45Schristos #define TAG_CPU_ARCH_V8M_BASE	16
113ba340e45Schristos #define TAG_CPU_ARCH_V8M_MAIN	17
1144b169a6bSchristos #define TAG_CPU_ARCH_8_1A       18
1154b169a6bSchristos #define TAG_CPU_ARCH_8_2A       19
1164b169a6bSchristos #define TAG_CPU_ARCH_8_3A       20
1178dffb485Schristos #define TAG_CPU_ARCH_V8_1M_MAIN 21
1184b169a6bSchristos #define TAG_CPU_ARCH_V9         22
1194b169a6bSchristos #define MAX_TAG_CPU_ARCH	TAG_CPU_ARCH_V9
12098b9484cSchristos /* Pseudo-architecture to allow objects to be compatible with the subset of
12198b9484cSchristos    armv4t and armv6-m.  This value should never be stored in object files.  */
12298b9484cSchristos #define TAG_CPU_ARCH_V4T_PLUS_V6_M (MAX_TAG_CPU_ARCH + 1)
12398b9484cSchristos 
12498b9484cSchristos /* Relocation types.  */
12598b9484cSchristos 
12698b9484cSchristos START_RELOC_NUMBERS (elf_arm_reloc_type)
12798b9484cSchristos /* AAELF official names and numbers.  */
12898b9484cSchristos   RELOC_NUMBER (R_ARM_NONE,            	  0)
12998b9484cSchristos   RELOC_NUMBER (R_ARM_PC24,            	  1)   /* deprecated */
13098b9484cSchristos   RELOC_NUMBER (R_ARM_ABS32,           	  2)
13198b9484cSchristos   RELOC_NUMBER (R_ARM_REL32,           	  3)
13298b9484cSchristos   RELOC_NUMBER (R_ARM_LDR_PC_G0,       	  4)
13398b9484cSchristos   RELOC_NUMBER (R_ARM_ABS16,           	  5)
13498b9484cSchristos   RELOC_NUMBER (R_ARM_ABS12,           	  6)
13598b9484cSchristos   RELOC_NUMBER (R_ARM_THM_ABS5,        	  7)
13698b9484cSchristos   RELOC_NUMBER (R_ARM_ABS8,            	  8)
13798b9484cSchristos   RELOC_NUMBER (R_ARM_SBREL32,         	  9)
13898b9484cSchristos   RELOC_NUMBER (R_ARM_THM_CALL,        	 10)
13998b9484cSchristos   RELOC_NUMBER (R_ARM_THM_PC8,         	 11)
14098b9484cSchristos   RELOC_NUMBER (R_ARM_BREL_ADJ,	       	 12)
14198b9484cSchristos   RELOC_NUMBER (R_ARM_TLS_DESC,          13)
14298b9484cSchristos   RELOC_NUMBER (R_ARM_THM_SWI8,        	 14)   /* obsolete */
14398b9484cSchristos   RELOC_NUMBER (R_ARM_XPC25,           	 15)   /* obsolete */
14498b9484cSchristos   RELOC_NUMBER (R_ARM_THM_XPC22,       	 16)   /* obsolete */
14598b9484cSchristos   RELOC_NUMBER (R_ARM_TLS_DTPMOD32,    	 17)
14698b9484cSchristos   RELOC_NUMBER (R_ARM_TLS_DTPOFF32,    	 18)
14798b9484cSchristos   RELOC_NUMBER (R_ARM_TLS_TPOFF32,     	 19)
14898b9484cSchristos   RELOC_NUMBER (R_ARM_COPY,            	 20)   /* Copy symbol at runtime.  */
14998b9484cSchristos   RELOC_NUMBER (R_ARM_GLOB_DAT,        	 21)   /* Create GOT entry.  */
15098b9484cSchristos   RELOC_NUMBER (R_ARM_JUMP_SLOT,       	 22)   /* Create PLT entry.  */
15198b9484cSchristos   RELOC_NUMBER (R_ARM_RELATIVE,        	 23)   /* Adjust by program base.  */
15298b9484cSchristos   RELOC_NUMBER (R_ARM_GOTOFF32,        	 24)   /* 32 bit offset to GOT.  */
15398b9484cSchristos   RELOC_NUMBER (R_ARM_BASE_PREL,       	 25)   /* 32 bit PC relative offset to GOT.  */
15498b9484cSchristos   RELOC_NUMBER (R_ARM_GOT_BREL,        	 26)   /* 32 bit GOT entry.  */
15598b9484cSchristos   RELOC_NUMBER (R_ARM_PLT32,           	 27)   /* deprecated - 32 bit PLT address.  */
15698b9484cSchristos   RELOC_NUMBER (R_ARM_CALL,            	 28)
15798b9484cSchristos   RELOC_NUMBER (R_ARM_JUMP24,          	 29)
15898b9484cSchristos   RELOC_NUMBER (R_ARM_THM_JUMP24,      	 30)
15998b9484cSchristos   RELOC_NUMBER (R_ARM_BASE_ABS,        	 31)
16098b9484cSchristos   RELOC_NUMBER (R_ARM_ALU_PCREL7_0,    	 32)   /* obsolete */
16198b9484cSchristos   RELOC_NUMBER (R_ARM_ALU_PCREL15_8,   	 33)   /* obsolete */
16298b9484cSchristos   RELOC_NUMBER (R_ARM_ALU_PCREL23_15,  	 34)   /* obsolete */
16398b9484cSchristos   RELOC_NUMBER (R_ARM_LDR_SBREL_11_0,  	 35)   /* deprecated, should have _NC suffix */
16498b9484cSchristos   RELOC_NUMBER (R_ARM_ALU_SBREL_19_12, 	 36)   /* deprecated, should have _NC suffix */
16598b9484cSchristos   RELOC_NUMBER (R_ARM_ALU_SBREL_27_20, 	 37)   /* deprecated, should have _CK suffix */
16698b9484cSchristos   RELOC_NUMBER (R_ARM_TARGET1,         	 38)
16798b9484cSchristos   RELOC_NUMBER (R_ARM_SBREL31,         	 39)   /* deprecated */
16898b9484cSchristos   RELOC_NUMBER (R_ARM_V4BX,            	 40)
16998b9484cSchristos   RELOC_NUMBER (R_ARM_TARGET2,	       	 41)
17098b9484cSchristos   RELOC_NUMBER (R_ARM_PREL31,	       	 42)
17198b9484cSchristos   RELOC_NUMBER (R_ARM_MOVW_ABS_NC,     	 43)
17298b9484cSchristos   RELOC_NUMBER (R_ARM_MOVT_ABS,        	 44)
17398b9484cSchristos   RELOC_NUMBER (R_ARM_MOVW_PREL_NC,    	 45)
17498b9484cSchristos   RELOC_NUMBER (R_ARM_MOVT_PREL,       	 46)
17598b9484cSchristos   RELOC_NUMBER (R_ARM_THM_MOVW_ABS_NC, 	 47)
17698b9484cSchristos   RELOC_NUMBER (R_ARM_THM_MOVT_ABS,    	 48)
17798b9484cSchristos   RELOC_NUMBER (R_ARM_THM_MOVW_PREL_NC,	 49)
17898b9484cSchristos   RELOC_NUMBER (R_ARM_THM_MOVT_PREL,   	 50)
17998b9484cSchristos   RELOC_NUMBER (R_ARM_THM_JUMP19,      	 51)
18098b9484cSchristos   RELOC_NUMBER (R_ARM_THM_JUMP6,       	 52)
18198b9484cSchristos   RELOC_NUMBER (R_ARM_THM_ALU_PREL_11_0, 53)
18298b9484cSchristos   RELOC_NUMBER (R_ARM_THM_PC12,        	 54)
18398b9484cSchristos   RELOC_NUMBER (R_ARM_ABS32_NOI,       	 55)
18498b9484cSchristos   RELOC_NUMBER (R_ARM_REL32_NOI,       	 56)
18598b9484cSchristos   RELOC_NUMBER (R_ARM_ALU_PC_G0_NC,      57)
18698b9484cSchristos   RELOC_NUMBER (R_ARM_ALU_PC_G0,         58)
18798b9484cSchristos   RELOC_NUMBER (R_ARM_ALU_PC_G1_NC,      59)
18898b9484cSchristos   RELOC_NUMBER (R_ARM_ALU_PC_G1,         60)
18998b9484cSchristos   RELOC_NUMBER (R_ARM_ALU_PC_G2,         61)
19098b9484cSchristos   RELOC_NUMBER (R_ARM_LDR_PC_G1,         62)
19198b9484cSchristos   RELOC_NUMBER (R_ARM_LDR_PC_G2,         63)
19298b9484cSchristos   RELOC_NUMBER (R_ARM_LDRS_PC_G0,        64)
19398b9484cSchristos   RELOC_NUMBER (R_ARM_LDRS_PC_G1,        65)
19498b9484cSchristos   RELOC_NUMBER (R_ARM_LDRS_PC_G2,        66)
19598b9484cSchristos   RELOC_NUMBER (R_ARM_LDC_PC_G0,         67)
19698b9484cSchristos   RELOC_NUMBER (R_ARM_LDC_PC_G1,         68)
19798b9484cSchristos   RELOC_NUMBER (R_ARM_LDC_PC_G2,         69)
19898b9484cSchristos   RELOC_NUMBER (R_ARM_ALU_SB_G0_NC,      70)
19998b9484cSchristos   RELOC_NUMBER (R_ARM_ALU_SB_G0,         71)
20098b9484cSchristos   RELOC_NUMBER (R_ARM_ALU_SB_G1_NC,      72)
20198b9484cSchristos   RELOC_NUMBER (R_ARM_ALU_SB_G1,         73)
20298b9484cSchristos   RELOC_NUMBER (R_ARM_ALU_SB_G2,         74)
20398b9484cSchristos   RELOC_NUMBER (R_ARM_LDR_SB_G0,         75)
20498b9484cSchristos   RELOC_NUMBER (R_ARM_LDR_SB_G1,         76)
20598b9484cSchristos   RELOC_NUMBER (R_ARM_LDR_SB_G2,         77)
20698b9484cSchristos   RELOC_NUMBER (R_ARM_LDRS_SB_G0,        78)
20798b9484cSchristos   RELOC_NUMBER (R_ARM_LDRS_SB_G1,        79)
20898b9484cSchristos   RELOC_NUMBER (R_ARM_LDRS_SB_G2,        80)
20998b9484cSchristos   RELOC_NUMBER (R_ARM_LDC_SB_G0,         81)
21098b9484cSchristos   RELOC_NUMBER (R_ARM_LDC_SB_G1,         82)
21198b9484cSchristos   RELOC_NUMBER (R_ARM_LDC_SB_G2,         83)
21298b9484cSchristos   RELOC_NUMBER (R_ARM_MOVW_BREL_NC,    	 84)
21398b9484cSchristos   RELOC_NUMBER (R_ARM_MOVT_BREL,       	 85)
21498b9484cSchristos   RELOC_NUMBER (R_ARM_MOVW_BREL,       	 86)
21598b9484cSchristos   RELOC_NUMBER (R_ARM_THM_MOVW_BREL_NC,	 87)
21698b9484cSchristos   RELOC_NUMBER (R_ARM_THM_MOVT_BREL,   	 88)
21798b9484cSchristos   RELOC_NUMBER (R_ARM_THM_MOVW_BREL,   	 89)
21898b9484cSchristos   RELOC_NUMBER (R_ARM_TLS_GOTDESC,       90)
21998b9484cSchristos   RELOC_NUMBER (R_ARM_TLS_CALL,          91)
22098b9484cSchristos   RELOC_NUMBER (R_ARM_TLS_DESCSEQ,       92)
22198b9484cSchristos   RELOC_NUMBER (R_ARM_THM_TLS_CALL,      93)
22298b9484cSchristos   RELOC_NUMBER (R_ARM_PLT32_ABS,       	 94)
22398b9484cSchristos   RELOC_NUMBER (R_ARM_GOT_ABS,	       	 95)
22498b9484cSchristos   RELOC_NUMBER (R_ARM_GOT_PREL,	       	 96)
22598b9484cSchristos   RELOC_NUMBER (R_ARM_GOT_BREL12,      	 97)
22698b9484cSchristos   RELOC_NUMBER (R_ARM_GOTOFF12,	       	 98)
22798b9484cSchristos   RELOC_NUMBER (R_ARM_GOTRELAX,	       	 99)
22898b9484cSchristos   RELOC_NUMBER (R_ARM_GNU_VTENTRY,    	100)   /* deprecated - old C++ abi */
22998b9484cSchristos   RELOC_NUMBER (R_ARM_GNU_VTINHERIT,  	101)   /* deprecated - old C++ abi */
23098b9484cSchristos   RELOC_NUMBER (R_ARM_THM_JUMP11,     	102)
23198b9484cSchristos   RELOC_NUMBER (R_ARM_THM_JUMP8,      	103)
23298b9484cSchristos   RELOC_NUMBER (R_ARM_TLS_GD32,	      	104)
23398b9484cSchristos   RELOC_NUMBER (R_ARM_TLS_LDM32,      	105)
23498b9484cSchristos   RELOC_NUMBER (R_ARM_TLS_LDO32,      	106)
23598b9484cSchristos   RELOC_NUMBER (R_ARM_TLS_IE32,       	107)
23698b9484cSchristos   RELOC_NUMBER (R_ARM_TLS_LE32,	      	108)
23798b9484cSchristos   RELOC_NUMBER (R_ARM_TLS_LDO12,      	109)
23898b9484cSchristos   RELOC_NUMBER (R_ARM_TLS_LE12,	      	110)
23998b9484cSchristos   RELOC_NUMBER (R_ARM_TLS_IE12GP,     	111)
24098b9484cSchristos   /* 112 - 127 private range */
24198b9484cSchristos   RELOC_NUMBER (R_ARM_ME_TOO,	        128)   /* obsolete */
24298b9484cSchristos   RELOC_NUMBER (R_ARM_THM_TLS_DESCSEQ  ,129)
24398b9484cSchristos 
244ba340e45Schristos   RELOC_NUMBER (R_ARM_THM_ALU_ABS_G0_NC,132)
245ba340e45Schristos   RELOC_NUMBER (R_ARM_THM_ALU_ABS_G1_NC,133)
246ba340e45Schristos   RELOC_NUMBER (R_ARM_THM_ALU_ABS_G2_NC,134)
247ba340e45Schristos   RELOC_NUMBER (R_ARM_THM_ALU_ABS_G3_NC,135)
2488dffb485Schristos   RELOC_NUMBER (R_ARM_THM_BF16,		136)
2498dffb485Schristos   RELOC_NUMBER (R_ARM_THM_BF12,		137)
2508dffb485Schristos   RELOC_NUMBER (R_ARM_THM_BF18,		138)
251ba340e45Schristos 
25298b9484cSchristos   RELOC_NUMBER (R_ARM_IRELATIVE,      	160)
2534559860eSchristos   RELOC_NUMBER (R_ARM_GOTFUNCDESC,    	161)
2544559860eSchristos   RELOC_NUMBER (R_ARM_GOTOFFFUNCDESC, 	162)
2554559860eSchristos   RELOC_NUMBER (R_ARM_FUNCDESC,       	163)
2564559860eSchristos   RELOC_NUMBER (R_ARM_FUNCDESC_VALUE, 	164)
2574559860eSchristos   RELOC_NUMBER (R_ARM_TLS_GD32_FDPIC,   165)
2584559860eSchristos   RELOC_NUMBER (R_ARM_TLS_LDM32_FDPIC,  166)
2594559860eSchristos   RELOC_NUMBER (R_ARM_TLS_IE32_FDPIC,   167)
26098b9484cSchristos 
26198b9484cSchristos   /* Extensions?  R=read-only?  */
26298b9484cSchristos   RELOC_NUMBER (R_ARM_RXPC25,         	249)
26398b9484cSchristos   RELOC_NUMBER (R_ARM_RSBREL32,       	250)
26498b9484cSchristos   RELOC_NUMBER (R_ARM_THM_RPC22,      	251)
26598b9484cSchristos   RELOC_NUMBER (R_ARM_RREL32,         	252)
26698b9484cSchristos   RELOC_NUMBER (R_ARM_RABS32,         	253)
26798b9484cSchristos   RELOC_NUMBER (R_ARM_RPC24,          	254)
26898b9484cSchristos   RELOC_NUMBER (R_ARM_RBASE,          	255)
26998b9484cSchristos 
27098b9484cSchristos   /* Unofficial names for some of the relocs.  */
27198b9484cSchristos   FAKE_RELOC (R_ARM_GOTOFF,             R_ARM_GOTOFF32)   /* 32 bit offset to GOT.  */
27298b9484cSchristos   FAKE_RELOC (R_ARM_THM_PC22,           R_ARM_THM_CALL)
27398b9484cSchristos   FAKE_RELOC (R_ARM_THM_PC11,           R_ARM_THM_JUMP11)
27498b9484cSchristos   FAKE_RELOC (R_ARM_THM_PC9,            R_ARM_THM_JUMP8)
27598b9484cSchristos 
27698b9484cSchristos   /* Relocs with both a different name, and (apparently) different meaning in
27798b9484cSchristos      GNU usage.  */
27898b9484cSchristos   FAKE_RELOC (R_ARM_GOTPC,              R_ARM_BASE_PREL)  /* 32 bit PC relative offset to GOT.  */
27998b9484cSchristos   FAKE_RELOC (R_ARM_GOT32,              R_ARM_GOT_BREL)   /* 32 bit GOT entry.  */
28098b9484cSchristos   FAKE_RELOC (R_ARM_ROSEGREL32,         R_ARM_SBREL31)    /* ??? */
28198b9484cSchristos   FAKE_RELOC (R_ARM_AMP_VCALL9,         R_ARM_BREL_ADJ)   /* Thumb-something.  Not used.  */
28298b9484cSchristos 
28398b9484cSchristos END_RELOC_NUMBERS (R_ARM_max = 256)
28498b9484cSchristos 
28598b9484cSchristos #ifdef BFD_ARCH_SIZE
28698b9484cSchristos /* EABI object attributes.  */
28798b9484cSchristos 
28898b9484cSchristos enum
28998b9484cSchristos {
29098b9484cSchristos   /* 0-3 are generic.  */
29198b9484cSchristos   Tag_CPU_raw_name = 4,
29298b9484cSchristos   Tag_CPU_name,
29398b9484cSchristos   Tag_CPU_arch,
29498b9484cSchristos   Tag_CPU_arch_profile,
29598b9484cSchristos   Tag_ARM_ISA_use,
29698b9484cSchristos   Tag_THUMB_ISA_use,
29798b9484cSchristos   Tag_FP_arch,
29898b9484cSchristos   Tag_WMMX_arch,
29998b9484cSchristos   Tag_Advanced_SIMD_arch,
30098b9484cSchristos   Tag_PCS_config,
30198b9484cSchristos   Tag_ABI_PCS_R9_use,
30298b9484cSchristos   Tag_ABI_PCS_RW_data,
30398b9484cSchristos   Tag_ABI_PCS_RO_data,
30498b9484cSchristos   Tag_ABI_PCS_GOT_use,
30598b9484cSchristos   Tag_ABI_PCS_wchar_t,
30698b9484cSchristos   Tag_ABI_FP_rounding,
30798b9484cSchristos   Tag_ABI_FP_denormal,
30898b9484cSchristos   Tag_ABI_FP_exceptions,
30998b9484cSchristos   Tag_ABI_FP_user_exceptions,
31098b9484cSchristos   Tag_ABI_FP_number_model,
31198b9484cSchristos   Tag_ABI_align_needed,
31298b9484cSchristos   Tag_ABI_align_preserved,
31398b9484cSchristos   Tag_ABI_enum_size,
31498b9484cSchristos   Tag_ABI_HardFP_use,
31598b9484cSchristos   Tag_ABI_VFP_args,
31698b9484cSchristos   Tag_ABI_WMMX_args,
31798b9484cSchristos   Tag_ABI_optimization_goals,
31898b9484cSchristos   Tag_ABI_FP_optimization_goals,
31998b9484cSchristos   /* 32 is generic (Tag_compatibility).  */
32098b9484cSchristos   Tag_undefined33 = 33,
32198b9484cSchristos   Tag_CPU_unaligned_access,
32298b9484cSchristos   Tag_undefined35,
32398b9484cSchristos   Tag_FP_HP_extension,
32498b9484cSchristos   Tag_undefined37,
32598b9484cSchristos   Tag_ABI_FP_16bit_format,
32698b9484cSchristos   Tag_undefined39,
32798b9484cSchristos   Tag_undefined40,
32898b9484cSchristos   Tag_undefined41,
32998b9484cSchristos   Tag_MPextension_use,
33098b9484cSchristos   Tag_undefined_43,
33198b9484cSchristos   Tag_DIV_use,
332ba340e45Schristos   Tag_DSP_extension = 46,
3338dffb485Schristos   Tag_MVE_arch = 48,
3344b169a6bSchristos   Tag_PAC_extension = 50,
3354b169a6bSchristos   Tag_BTI_extension = 52,
3364b169a6bSchristos   Tag_BTI_use = 74,
3374b169a6bSchristos   Tag_PACRET_use = 76,
33898b9484cSchristos   Tag_nodefaults = 64,
33998b9484cSchristos   Tag_also_compatible_with,
34098b9484cSchristos   Tag_T2EE_use,
34198b9484cSchristos   Tag_conformance,
34298b9484cSchristos   Tag_Virtualization_use,
34398b9484cSchristos   Tag_undefined69,
34498b9484cSchristos   Tag_MPextension_use_legacy,
34598b9484cSchristos 
34698b9484cSchristos   /* The following tags are legacy names for other tags.  */
34798b9484cSchristos   Tag_VFP_arch = Tag_FP_arch,
34898b9484cSchristos   Tag_ABI_align8_needed = Tag_ABI_align_needed,
34998b9484cSchristos   Tag_ABI_align8_preserved = Tag_ABI_align_preserved,
35098b9484cSchristos   Tag_VFP_HP_extension = Tag_FP_HP_extension
35198b9484cSchristos };
35298b9484cSchristos 
353968cf8f2Schristos /* Values for Tag_ABI_FP_number_model.  */
354968cf8f2Schristos enum
355968cf8f2Schristos {
356968cf8f2Schristos   AEABI_FP_number_model_none = 0,
357968cf8f2Schristos   AEABI_FP_number_model_ieee754_number = 1,
358968cf8f2Schristos   AEABI_FP_number_model_rtabi = 2,
359968cf8f2Schristos   AEABI_FP_number_model_ieee754_all = 3
360968cf8f2Schristos };
361968cf8f2Schristos 
362968cf8f2Schristos /* Values for Tag_ABI_VFP_args.  */
363968cf8f2Schristos enum
364968cf8f2Schristos {
365968cf8f2Schristos   AEABI_VFP_args_base = 0,
366968cf8f2Schristos   AEABI_VFP_args_vfp = 1,
367968cf8f2Schristos   AEABI_VFP_args_toolchain = 2,
368968cf8f2Schristos   AEABI_VFP_args_compatible = 3
369968cf8f2Schristos };
37098b9484cSchristos #endif
37198b9484cSchristos 
37298b9484cSchristos /* The name of the note section used to identify arm variants.  */
37398b9484cSchristos #define ARM_NOTE_SECTION ".note.gnu.arm.ident"
37498b9484cSchristos 
37598b9484cSchristos /* Special section names.  */
37698b9484cSchristos #define ELF_STRING_ARM_unwind           ".ARM.exidx"
37798b9484cSchristos #define ELF_STRING_ARM_unwind_info      ".ARM.extab"
37898b9484cSchristos #define ELF_STRING_ARM_unwind_once      ".gnu.linkonce.armexidx."
37998b9484cSchristos #define ELF_STRING_ARM_unwind_info_once ".gnu.linkonce.armextab."
38098b9484cSchristos 
38198b9484cSchristos enum arm_st_branch_type {
38298b9484cSchristos   ST_BRANCH_TO_ARM,
38398b9484cSchristos   ST_BRANCH_TO_THUMB,
384a2e2270fSchristos   ST_BRANCH_LONG,
385ba340e45Schristos   ST_BRANCH_UNKNOWN,
386ba340e45Schristos   ST_BRANCH_ENUM_SIZE
38798b9484cSchristos };
38898b9484cSchristos 
389ba340e45Schristos #define NUM_ENUM_ARM_ST_BRANCH_TYPE_BITS 2
390ba340e45Schristos #define ENUM_ARM_ST_BRANCH_TYPE_BITMASK	\
391ba340e45Schristos   ((1 << NUM_ENUM_ARM_ST_BRANCH_TYPE_BITS) - 1)
392ba340e45Schristos 
393ba340e45Schristos #define ARM_GET_SYM_BRANCH_TYPE(STI) \
394ba340e45Schristos   ((enum arm_st_branch_type) ((STI) & ENUM_ARM_ST_BRANCH_TYPE_BITMASK))
395ba340e45Schristos #ifdef BFD_ASSERT
396ba340e45Schristos #define ARM_SET_SYM_BRANCH_TYPE(STI, TYPE)			\
397ba340e45Schristos   do {								\
398ba340e45Schristos     BFD_ASSERT (TYPE <= ST_BRANCH_ENUM_SIZE);			\
399ba340e45Schristos     BFD_ASSERT ((1 << NUM_ENUM_ARM_ST_BRANCH_TYPE_BITS)		\
400ba340e45Schristos 		>= ST_BRANCH_ENUM_SIZE);			\
401ba340e45Schristos     (STI) = (((STI) & ~ENUM_ARM_ST_BRANCH_TYPE_BITMASK)		\
402ba340e45Schristos 	     | ((TYPE) & ENUM_ARM_ST_BRANCH_TYPE_BITMASK));	\
403ba340e45Schristos   } while (0)
404ba340e45Schristos #else
405ba340e45Schristos #define ARM_SET_SYM_BRANCH_TYPE(STI, TYPE)			\
406ba340e45Schristos   (STI) = (((STI) & ~ENUM_ARM_ST_BRANCH_TYPE_BITMASK)		\
407ba340e45Schristos 	   | ((TYPE) & ENUM_ARM_ST_BRANCH_TYPE_BITMASK))
408ba340e45Schristos #endif
40998b9484cSchristos 
41098b9484cSchristos #endif /* _ELF_ARM_H */
411