1 /* $OpenBSD: exec.h,v 1.7 2006/02/22 22:06:38 miod Exp $ */ 2 /* $NetBSD: elf_machdep.h,v 1.7 2001/02/11 00:18:49 eeh Exp $ */ 3 4 #define NATIVE_EXEC_ELF 5 #define _KERN_DO_ELF64 6 #define _NLIST_DO_ELF 7 8 #define ARCH_ELFSIZE 64 /* MD native binary size */ 9 #define ELF_TARG_CLASS ELFCLASS64 10 #define ELF_TARG_MACH EM_SPARCV9 11 12 #define ELF_TARG_DATA ELFDATA2MSB 13 14 /* The following are what is used for AT_SUN_HWCAP: */ 15 #define AV_SPARC_HWMUL_32x32 1 /* 32x32-bit smul/umul is efficient */ 16 #define AV_SPARC_HWDIV_32x32 2 /* 32x32-bit sdiv/udiv is efficient */ 17 #define AV_SPARC_HWFSMULD 4 /* fsmuld is efficient */ 18 19 /* 20 * Here are some SPARC specific flags I can't 21 * find a better home for. They are used for AT_FLAGS 22 * and in the exec header. 23 */ 24 #define EF_SPARCV9_MM 0x3 25 #define EF_SPARCV9_TSO 0x0 26 #define EF_SPARCV9_PSO 0x1 27 #define EF_SPARCV9_RMO 0x2 28 29 #define EF_SPARC_32PLUS_MASK 0xffff00 /* bits indicating V8+ type */ 30 #define EF_SPARC_32PLUS 0x000100 /* generic V8+ features */ 31 #define EF_SPARC_EXT_MASK 0xffff00 /* bits for vendor extensions */ 32 #define EF_SPARC_SUN_US1 0x000200 /* UltraSPARC 1 extensions */ 33 #define EF_SPARC_HAL_R1 0x000400 /* HAL R1 extensions */ 34 #define EF_SPARC_SUN_US3 0x000800 /* UltraSPARC 3 extensions */ 35 36 /* Relocation types */ 37 #define R_SPARC_NONE 0 38 #define R_SPARC_8 1 39 #define R_SPARC_16 2 40 #define R_SPARC_32 3 41 #define R_SPARC_DISP8 4 42 #define R_SPARC_DISP16 5 43 #define R_SPARC_DISP32 6 44 #define R_SPARC_WDISP30 7 45 #define R_SPARC_WDISP22 8 46 #define R_SPARC_HI22 9 47 #define R_SPARC_22 10 48 #define R_SPARC_13 11 49 #define R_SPARC_LO10 12 50 #define R_SPARC_GOT10 13 51 #define R_SPARC_GOT13 14 52 #define R_SPARC_GOT22 15 53 #define R_SPARC_PC10 16 54 #define R_SPARC_PC22 17 55 #define R_SPARC_WPLT30 18 56 #define R_SPARC_COPY 19 57 #define R_SPARC_GLOB_DAT 20 58 #define R_SPARC_JMP_SLOT 21 59 #define R_SPARC_RELATIVE 22 60 #define R_SPARC_UA32 23 61 #define R_SPARC_PLT32 24 62 #define R_SPARC_HIPLT22 25 63 #define R_SPARC_LOPLT10 26 64 #define R_SPARC_PCPLT32 27 65 #define R_SPARC_PCPLT22 28 66 #define R_SPARC_PCPLT10 29 67 #define R_SPARC_10 30 68 #define R_SPARC_11 31 69 #define R_SPARC_64 32 70 #define R_SPARC_OLO10 33 71 #define R_SPARC_HH22 34 72 #define R_SPARC_HM10 35 73 #define R_SPARC_LM22 36 74 #define R_SPARC_PC_HH22 37 75 #define R_SPARC_PC_HM10 38 76 #define R_SPARC_PC_LM22 39 77 #define R_SPARC_WDISP16 40 78 #define R_SPARC_WDISP19 41 79 #define R_SPARC_GLOB_JMP 42 80 #define R_SPARC_7 43 81 #define R_SPARC_5 44 82 #define R_SPARC_6 45 83 #define R_SPARC_DISP64 46 84 #define R_SPARC_PLT64 47 85 #define R_SPARC_HIX22 48 86 #define R_SPARC_LOX10 49 87 #define R_SPARC_H44 50 88 #define R_SPARC_M44 51 89 #define R_SPARC_L44 52 90 #define R_SPARC_REGISTER 53 91 #define R_SPARC_UA64 54 92 #define R_SPARC_UA16 55 93 94 95 #define R_TYPE(name) __CONCAT(R_SPARC_,name) 96 97 #define __LDPGSZ 8192 /* linker page size */ 98