1 /* $NetBSD: elf_machdep.h,v 1.2 2001/01/18 23:50:50 bjh21 Exp $ */ 2 3 #define ELF32_MACHDEP_ENDIANNESS ELFDATA2LSB 4 5 /* Processor specific flags for the ELF header e_flags field. */ 6 #define EF_ARM_RELEXEC 0x00000001 7 #define EF_ARM_HASENTRY 0x00000002 8 #define EF_ARM_INTERWORK 0x00000004 /* GNU binutils 000413 */ 9 #define EF_ARM_SYMSARESORTED 0x00000004 /* ARM ELF A08 */ 10 #define EF_ARM_APCS_26 0x00000008 /* GNU binutils 000413 */ 11 #define EF_ARM_DYNSYMSUSESEGIDX 0x00000008 /* ARM ELF B01 */ 12 #define EF_ARM_APCS_FLOAT 0x00000010 /* GNU binutils 000413 */ 13 #define EF_ARM_MAPSYMSFIRST 0x00000010 /* ARM ELF B01 */ 14 #define EF_ARM_PIC 0x00000020 15 #define EF_ARM_ALIGN8 0x00000040 /* 8-bit structure alignment. */ 16 #define EF_ARM_NEW_ABI 0x00000080 17 #define EF_ARM_OLD_ABI 0x00000100 18 #define EF_ARM_SOFT_FLOAT 0x00000200 19 #define EF_ARM_EABIMASK 0xff000000 20 21 #define ELF32_MACHDEP_ID_CASES \ 22 case EM_ARM: \ 23 break; 24 25 #define ARCH_ELFSIZE 32 /* MD native binary size */ 26 27 /* Processor specific relocation types */ 28 29 #define R_ARM_NONE 0 30 #define R_ARM_PC24 1 31 #define R_ARM_ABS32 2 32 #define R_ARM_REL32 3 33 #define R_ARM_PC13 4 34 #define R_ARM_ABS16 5 35 #define R_ARM_ABS12 6 36 #define R_ARM_THM_ABS5 7 37 #define R_ARM_ABS8 8 38 #define R_ARM_SBREL32 9 39 #define R_ARM_THM_PC22 10 40 #define R_ARM_THM_PC8 11 41 #define R_ARM_AMP_VCALL9 12 42 #define R_ARM_SWI24 13 43 #define R_ARM_THM_SWI8 14 44 #define R_ARM_XPC25 15 45 #define R_ARM_THM_XPC22 16 46 47 /* 17-31 are reserved for ARM Linux. */ 48 #define R_ARM_COPY 20 49 #define R_ARM_GLOB_DAT 21 50 #define R_ARM_JUMP_SLOT 22 51 #define R_ARM_RELATIVE 23 52 #define R_ARM_GOTOFF 24 53 #define R_ARM_GOTPC 25 54 #define R_ARM_GOT32 26 55 #define R_ARM_PLT32 27 56 57 #define R_ARM_ALU_PCREL_7_0 32 58 #define R_ARM_ALU_PCREL_15_8 33 59 #define R_ARM_ALU_PCREL_23_15 34 60 #define R_ARM_ALU_SBREL_11_0 35 61 #define R_ARM_ALU_SBREL_19_12 36 62 #define R_ARM_ALU_SBREL_27_20 37 63 64 /* 96-111 are reserved to G++. */ 65 #define R_ARM_GNU_VTENTRY 100 66 #define R_ARM_GNU_VTINHERIT 101 67 #define R_ARM_THM_PC11 102 68 #define R_ARM_THM_PC9 103 69 70 /* 112-127 are reserved for private experiments. */ 71 72 #define R_ARM_RXPC25 249 73 #define R_ARM_RSBREL32 250 74 #define R_ARM_THM_RPC22 251 75 #define R_ARM_RREL32 252 76 #define R_ARM_RABS32 253 77 #define R_ARM_RPC24 254 78 #define R_ARM_RBASE 255 79 80 #define R_TYPE(name) __CONCAT(R_ARM_,name) 81 82 /* Processor specific program header flags */ 83 #define PF_ARM_SB 0x10000000 84 #define PF_ARM_PI 0x20000000 85 #define PF_ARM_ENTRY 0x80000000 86 87 /* Processor specific section header flags */ 88 #define SHF_ENTRYSECT 0x10000000 89 #define SHF_COMDEF 0x80000000 90