1 //===- MipsRelocationFunction.h -------------------------------------------===// 2 // 3 // The MCLinker Project 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #define DECL_MIPS_APPLY_RELOC_FUNC(Name) \ 11 static MipsRelocationFactory::Result Name(Relocation& pEntry, \ 12 const MCLDInfo& pLDInfo, \ 13 MipsRelocationFactory& pParent); 14 15 #define DECL_MIPS_APPLY_RELOC_FUNCS \ 16 DECL_MIPS_APPLY_RELOC_FUNC(none) \ 17 DECL_MIPS_APPLY_RELOC_FUNC(abs32) \ 18 DECL_MIPS_APPLY_RELOC_FUNC(hi16) \ 19 DECL_MIPS_APPLY_RELOC_FUNC(lo16) \ 20 DECL_MIPS_APPLY_RELOC_FUNC(got16) \ 21 DECL_MIPS_APPLY_RELOC_FUNC(call16) \ 22 DECL_MIPS_APPLY_RELOC_FUNC(gprel32) 23 24 #define DECL_MIPS_APPLY_RELOC_FUNC_PTRS \ 25 { &none, 0, "R_MIPS_NONE" }, \ 26 { &none, 1, "R_MIPS_16" }, \ 27 { &abs32, 2, "R_MIPS_32" }, \ 28 { &none, 3, "R_MIPS_REL32" }, \ 29 { &none, 4, "R_MIPS_26" }, \ 30 { &hi16, 5, "R_MIPS_HI16" }, \ 31 { &lo16, 6, "R_MIPS_LO16" }, \ 32 { &none, 7, "R_MIPS_GPREL16" }, \ 33 { &none, 8, "R_MIPS_LITERAL" }, \ 34 { &got16, 9, "R_MIPS_GOT16" }, \ 35 { &none, 10, "R_MIPS_PC16" }, \ 36 { &call16, 11, "R_MIPS_CALL16" }, \ 37 { &gprel32, 12, "R_MIPS_GPREL32" }, \ 38 { &none, 13, "R_MIPS_UNUSED1" }, \ 39 { &none, 14, "R_MIPS_UNUSED2" }, \ 40 { &none, 15, "R_MIPS_UNUSED3" }, \ 41 { &none, 16, "R_MIPS_SHIFT5" }, \ 42 { &none, 17, "R_MIPS_SHIFT6" }, \ 43 { &none, 18, "R_MIPS_64" }, \ 44 { &none, 19, "R_MIPS_GOT_DISP" }, \ 45 { &none, 20, "R_MIPS_GOT_PAGE" }, \ 46 { &none, 21, "R_MIPS_GOT_OFST" }, \ 47 { &none, 22, "R_MIPS_GOT_HI16" }, \ 48 { &none, 23, "R_MIPS_GOT_LO16" }, \ 49 { &none, 24, "R_MIPS_SUB" }, \ 50 { &none, 25, "R_MIPS_INSERT_A" }, \ 51 { &none, 26, "R_MIPS_INSERT_B" }, \ 52 { &none, 27, "R_MIPS_DELETE" }, \ 53 { &none, 28, "R_MIPS_HIGHER" }, \ 54 { &none, 29, "R_MIPS_HIGHEST" }, \ 55 { &none, 30, "R_MIPS_CALL_HI16" }, \ 56 { &none, 31, "R_MIPS_CALL_LO16" }, \ 57 { &none, 32, "R_MIPS_SCN_DISP" }, \ 58 { &none, 33, "R_MIPS_REL16" }, \ 59 { &none, 34, "R_MIPS_ADD_IMMEDIATE" }, \ 60 { &none, 35, "R_MIPS_PJUMP" }, \ 61 { &none, 36, "R_MIPS_RELGOT" }, \ 62 { &none, 37, "R_MIPS_JALR" }, \ 63 { &none, 38, "R_MIPS_TLS_DTPMOD32" }, \ 64 { &none, 39, "R_MIPS_TLS_DTPREL32" }, \ 65 { &none, 40, "R_MIPS_TLS_DTPMOD64" }, \ 66 { &none, 41, "R_MIPS_TLS_DTPREL64" }, \ 67 { &none, 42, "R_MIPS_TLS_GD" }, \ 68 { &none, 43, "R_MIPS_TLS_LDM" }, \ 69 { &none, 44, "R_MIPS_TLS_DTPREL_HI16" }, \ 70 { &none, 45, "R_MIPS_TLS_DTPREL_LO16" }, \ 71 { &none, 46, "R_MIPS_TLS_GOTTPREL" }, \ 72 { &none, 47, "R_MIPS_TLS_TPREL32" }, \ 73 { &none, 48, "R_MIPS_TLS_TPREL64" }, \ 74 { &none, 49, "R_MIPS_TLS_TPREL_HI16" }, \ 75 { &none, 50, "R_MIPS_TLS_TPREL_LO16" }, \ 76 { &none, 51, "R_MIPS_GLOB_DAT" } 77