1 /* 2 Copyright (C) 2007-2012 David Anderson. All Rights Reserved. 3 Portions Copyright (C) 2012 SN Systems Ltd. All rights reserved. 4 5 This program is free software; you can redistribute it and/or modify it 6 under the terms of version 2.1 of the GNU Lesser General Public License 7 published by the Free Software Foundation. 8 9 This program is distributed in the hope that it would be useful, but 10 WITHOUT ANY WARRANTY; without even the implied warranty of 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 13 Further, this software is distributed without any warranty that it is 14 free of the rightful claim of any third person regarding infringement 15 or the like. Any license provided herein, whether implied or 16 otherwise, applies only to this software file. Patent licenses, if 17 any, provided herein do not apply to combinations of this program with 18 other software, or any other product whatsoever. 19 20 You should have received a copy of the GNU Lesser General Public License along 21 with this program; if not, write the Free Software Foundation, Inc., 51 22 Franklin Street - Fifth Floor, Boston MA 02110-1301, USA. 23 */ 24 25 #ifndef DWARF_RELOC_MIPS_H 26 #define DWARF_RELOC_MIPS_H 27 28 /* Definitions for MIPS */ 29 #define DWARF_RELOC_MIPS 30 31 /* Include the definitions only in the case of Windows */ 32 #ifdef _WIN32 33 /* Relocation types for MIPS */ 34 #define R_MIPS_NONE 0 35 #define R_MIPS_16 1 36 #define R_MIPS_32 2 37 #define R_MIPS_ADD R_MIPS_32 38 #define R_MIPS_REL 3 39 #define R_MIPS_REL32 R_MIPS_REL 40 #define R_MIPS_26 4 41 #define R_MIPS_HI16 5 42 #define R_MIPS_LO16 6 43 #define R_MIPS_GPREL 7 44 #define R_MIPS_GPREL16 R_MIPS_GPREL 45 #define R_MIPS_LITERAL 8 46 #define R_MIPS_GOT 9 47 #define R_MIPS_GOT16 R_MIPS_GOT 48 #define R_MIPS_PC16 10 49 #define R_MIPS_CALL 11 50 #define R_MIPS_CALL16 R_MIPS_CALL 51 #define R_MIPS_GPREL32 12 52 #define R_MIPS_UNUSED1 13 53 #define R_MIPS_UNUSED2 14 54 #define R_MIPS_UNUSED3 15 55 #define R_MIPS_SHIFT5 16 56 #define R_MIPS_SHIFT6 17 57 #define R_MIPS_64 18 58 #define R_MIPS_GOT_DISP 19 59 #define R_MIPS_GOT_PAGE 20 60 #define R_MIPS_GOT_OFST 21 61 #define R_MIPS_GOT_HI16 22 62 #define R_MIPS_GOT_LO16 23 63 #define R_MIPS_SUB 24 64 #define R_MIPS_INSERT_A 25 65 #define R_MIPS_INSERT_B 26 66 #define R_MIPS_DELETE 27 67 #define R_MIPS_HIGHER 28 68 #define R_MIPS_HIGHEST 29 69 #define R_MIPS_CALL_HI16 30 70 #define R_MIPS_CALL_LO16 31 71 #define R_MIPS_SCN_DISP 32 72 #define R_MIPS_REL16 33 73 #define R_MIPS_ADD_IMMEDIATE 34 74 75 /* Keep this the last entry. */ 76 #define R_MIPS_NUM 35 77 #endif /* _WIN32 */ 78 79 /* Relocation types for MIPS */ 80 static const char *reloc_type_names_MIPS[] = { 81 "R_MIPS_NONE", /* 00 */ 82 "R_MIPS_16", /* 01 */ 83 "R_MIPS_32", /* 02 */ 84 "R_MIPS_REL32", /* 03 */ 85 "R_MIPS_26", /* 04 */ 86 "R_MIPS_HI16", /* 05 */ 87 "R_MIPS_LO16", /* 06 */ 88 "R_MIPS_GPREL16", /* 07 */ 89 "R_MIPS_LITERAL", /* 08 */ 90 "R_MIPS_GOT16", /* 09 */ 91 "R_MIPS_PC16", /* 10 */ 92 "R_MIPS_CALL16", /* 11 */ 93 "R_MIPS_GPREL32", /* 12 */ 94 "R_MIPS_UNUSED1", /* 13 */ 95 "R_MIPS_UNUSED2", /* 14 */ 96 "R_MIPS_UNUSED3", /* 15 */ 97 "R_MIPS_SHIFT5", /* 16 */ 98 "R_MIPS_SHIFT6", /* 17 */ 99 "R_MIPS_64", /* 18 */ 100 "R_MIPS_GOT_DISP", /* 19 */ 101 "R_MIPS_GOT_PAGE", /* 20 */ 102 "R_MIPS_GOT_OFST", /* 21 */ 103 "R_MIPS_GOT_HI16", /* 22 */ 104 "R_MIPS_GOT_LO16", /* 23 */ 105 "R_MIPS_SUB", /* 24 */ 106 "R_MIPS_INSERT_A", /* 25 */ 107 "R_MIPS_INSERT_B", /* 26 */ 108 "R_MIPS_DELETE", /* 27 */ 109 "R_MIPS_HIGHER", /* 28 */ 110 "R_MIPS_HIGHEST", /* 29 */ 111 "R_MIPS_CALL_HI16", /* 30 */ 112 "R_MIPS_CALL_LO16", /* 31 */ 113 "R_MIPS_SCN_DISP", /* 32 */ 114 "R_MIPS_REL16", /* 33 */ 115 "R_MIPS_ADD_IMMEDIATE", /* 34 */ 116 }; 117 #endif /* DWARF_RELOC_MIPS_H */ 118