1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 23 /* 24 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 25 * Use is subject to license terms. 26 */ 27 28 #ifndef _SYS_ELF_AMD64_H 29 #define _SYS_ELF_AMD64_H 30 31 #pragma ident "%Z%%M% %I% %E% SMI" 32 33 #ifdef __cplusplus 34 extern "C" { 35 #endif 36 37 #define R_AMD64_NONE 0 /* relocation types */ 38 #define R_AMD64_64 1 39 #define R_AMD64_PC32 2 40 #define R_AMD64_GOT32 3 41 #define R_AMD64_PLT32 4 42 #define R_AMD64_COPY 5 43 #define R_AMD64_GLOB_DAT 6 44 #define R_AMD64_JUMP_SLOT 7 45 #define R_AMD64_RELATIVE 8 46 #define R_AMD64_GOTPCREL 9 47 #define R_AMD64_32 10 48 #define R_AMD64_32S 11 49 #define R_AMD64_16 12 50 #define R_AMD64_PC16 13 51 #define R_AMD64_8 14 52 #define R_AMD64_PC8 15 53 #define R_AMD64_DTPMOD64 16 54 #define R_AMD64_DTPOFF64 17 55 #define R_AMD64_TPOFF64 18 56 #define R_AMD64_TLSGD 19 57 #define R_AMD64_TLSLD 20 58 #define R_AMD64_DTPOFF32 21 59 #define R_AMD64_GOTTPOFF 22 60 #define R_AMD64_TPOFF32 23 61 #define R_AMD64_PC64 24 62 #define R_AMD64_GOTOFF64 25 63 #define R_AMD64_GOTPC32 26 64 #define R_AMD64_GOT64 27 /* reserved for future expansion */ 65 #define R_AMD64_GOTPCREL64 28 /* reserved for future expansion */ 66 #define R_AMD64_GOTPC64 29 /* reserved for future expansion */ 67 #define R_AMD64_GOTPLT64 30 /* reserved for future expansion */ 68 #define R_AMD64_PLTOFF64 31 /* reserved for future expansion */ 69 #define R_AMD64_NUM 32 70 71 72 /* 73 * X86_64 compatibilty fields - these are obsolete, the prefered 74 * field naming are the _AMD64_ fields over the X86_64 names. 75 */ 76 #define R_X86_64_NONE R_AMD64_NONE 77 #define R_X86_64_64 R_AMD64_64 78 #define R_X86_64_PC32 R_AMD64_PC32 79 #define R_X86_64_GOT32 R_AMD64_GOT32 80 #define R_X86_64_PLT32 R_AMD64_PLT32 81 #define R_X86_64_COPY R_AMD64_COPY 82 #define R_X86_64_GLOB_DAT R_AMD64_GLOB_DAT 83 #define R_X86_64_JUMP_SLOT R_AMD64_JUMP_SLOT 84 #define R_X86_64_RELATIVE R_AMD64_RELATIVE 85 #define R_X86_64_GOTPCREL R_AMD64_GOTPCREL 86 #define R_X86_64_32 R_AMD64_32 87 #define R_X86_64_32S R_AMD64_32S 88 #define R_X86_64_16 R_AMD64_16 89 #define R_X86_64_PC16 R_AMD64_PC16 90 #define R_X86_64_8 R_AMD64_8 91 #define R_X86_64_PC8 R_AMD64_PC8 92 #define R_X86_64_DTPMOD64 R_AMD64_DTPMOD64 93 #define R_X86_64_DTPOFF64 R_AMD64_DTPOFF64 94 #define R_X86_64_TPOFF64 R_AMD64_TPOFF64 95 #define R_X86_64_TLSGD R_AMD64_TLSGD 96 #define R_X86_64_TLSLD R_AMD64_TLSLD 97 #define R_X86_64_DTPOFF32 R_AMD64_DTPOFF32 98 #define R_X86_64_GOTTPOFF R_AMD64_GOTTPOFF 99 #define R_X86_64_TPOFF32 R_AMD64_TPOFF32 100 #define R_X86_64_PC64 R_AMD64_PC64 101 #define R_X86_64_GOTPC32 R_AMD64_GOTPC32 102 #define R_X86_64_GOTOFF64 R_AMD64_GOTOFF64 103 #define R_X86_64_GOT64 R_AMD64_GOT64 104 #define R_X86_64_GOTPCREL64 R_AMD64_GOTPCREL64 105 #define R_X86_64_GOTPC64 R_AMD64_GOTPC64 106 #define R_X86_64_GOTPLT64 R_AMD64_GOTPLT64 107 #define R_X86_64_PLTOFF64 R_AMD64_PLTOFF64 108 #define R_X86_64_NUM R_AMD64_NUM 109 110 111 #define ELF_AMD64_MAXPGSZ 0x100000 /* maximum page size */ 112 113 /* 114 * processor specific section types 115 */ 116 #define SHT_AMD64_UNWIND 0x70000001 /* unwind information */ 117 118 119 /* 120 * NOTE: PT_SUNW_UNWIND is defined in the OS specific range 121 * to conform with the amd64 psABI. 122 */ 123 124 #define SHF_AMD64_LARGE 0x10000000 125 #define SHF_X86_64_LARGE SHF_AMD64_LARGE 126 #define SHF_ORDERED 0x40000000 127 #define SHF_EXCLUDE 0x80000000 128 129 #define SHN_BEFORE 0xff00 130 #define SHN_AFTER 0xff01 131 #define SHN_AMD64_LCOMMON 0xff02 132 #define SHN_X86_64_LCOMMON SHN_AMD64_LCOMMON 133 134 135 #ifdef __cplusplus 136 } 137 #endif 138 139 #endif /* _SYS_ELF_AMD64_H */ 140