Home | History | Annotate | Download | only in Mips
      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 MipsRelocator::Result Name(Relocation& pEntry, \
     12                                   MipsRelocator& pParent);
     13 
     14 #define DECL_MIPS_APPLY_RELOC_FUNCS \
     15 DECL_MIPS_APPLY_RELOC_FUNC(none) \
     16 DECL_MIPS_APPLY_RELOC_FUNC(abs32) \
     17 DECL_MIPS_APPLY_RELOC_FUNC(hi16) \
     18 DECL_MIPS_APPLY_RELOC_FUNC(lo16) \
     19 DECL_MIPS_APPLY_RELOC_FUNC(got16) \
     20 DECL_MIPS_APPLY_RELOC_FUNC(call16) \
     21 DECL_MIPS_APPLY_RELOC_FUNC(gprel32) \
     22 DECL_MIPS_APPLY_RELOC_FUNC(gothi16) \
     23 DECL_MIPS_APPLY_RELOC_FUNC(gotlo16)
     24 
     25 #define DECL_MIPS_APPLY_RELOC_FUNC_PTRS \
     26   { &none,     0, "R_MIPS_NONE",             0}, \
     27   { &none,     1, "R_MIPS_16",              16}, \
     28   { &abs32,    2, "R_MIPS_32",              32}, \
     29   { &none,     3, "R_MIPS_REL32",           32}, \
     30   { &none,     4, "R_MIPS_26",              64}, \
     31   { &hi16,     5, "R_MIPS_HI16",            16}, \
     32   { &lo16,     6, "R_MIPS_LO16",            16}, \
     33   { &none,     7, "R_MIPS_GPREL16",         16}, \
     34   { &none,     8, "R_MIPS_LITERAL",         16}, \
     35   { &got16,    9, "R_MIPS_GOT16",           16}, \
     36   { &none,    10, "R_MIPS_PC16",            16}, \
     37   { &call16,  11, "R_MIPS_CALL16",          16}, \
     38   { &gprel32, 12, "R_MIPS_GPREL32",         32}, \
     39   { &none,    13, "R_MIPS_UNUSED1",          0}, \
     40   { &none,    14, "R_MIPS_UNUSED2",          0}, \
     41   { &none,    15, "R_MIPS_UNUSED3",          0}, \
     42   { &none,    16, "R_MIPS_SHIFT5",          32}, \
     43   { &none,    17, "R_MIPS_SHIFT6",          32}, \
     44   { &none,    18, "R_MIPS_64",              64}, \
     45   { &none,    19, "R_MIPS_GOT_DISP",        16}, \
     46   { &none,    20, "R_MIPS_GOT_PAGE",        16}, \
     47   { &none,    21, "R_MIPS_GOT_OFST",        16}, \
     48   { &gothi16, 22, "R_MIPS_GOT_HI16",        16}, \
     49   { &gotlo16, 23, "R_MIPS_GOT_LO16",        16}, \
     50   { &none,    24, "R_MIPS_SUB",             64}, \
     51   { &none,    25, "R_MIPS_INSERT_A",         0}, \
     52   { &none,    26, "R_MIPS_INSERT_B",         0}, \
     53   { &none,    27, "R_MIPS_DELETE",           0}, \
     54   { &none,    28, "R_MIPS_HIGHER",          16}, \
     55   { &none,    29, "R_MIPS_HIGHEST",         16}, \
     56   { &gothi16, 30, "R_MIPS_CALL_HI16",       16}, \
     57   { &gotlo16, 31, "R_MIPS_CALL_LO16",       16}, \
     58   { &none,    32, "R_MIPS_SCN_DISP",        32}, \
     59   { &none,    33, "R_MIPS_REL16",            0}, \
     60   { &none,    34, "R_MIPS_ADD_IMMEDIATE",    0}, \
     61   { &none,    35, "R_MIPS_PJUMP",            0}, \
     62   { &none,    36, "R_MIPS_RELGOT",           0}, \
     63   { &none,    37, "R_MIPS_JALR",            32}, \
     64   { &none,    38, "R_MIPS_TLS_DTPMOD32",    32}, \
     65   { &none,    39, "R_MIPS_TLS_DTPREL32",    32}, \
     66   { &none,    40, "R_MIPS_TLS_DTPMOD64",     0}, \
     67   { &none,    41, "R_MIPS_TLS_DTPREL64",     0}, \
     68   { &none,    42, "R_MIPS_TLS_GD",          16}, \
     69   { &none,    43, "R_MIPS_TLS_LDM",         16}, \
     70   { &none,    44, "R_MIPS_TLS_DTPREL_HI16", 16}, \
     71   { &none,    45, "R_MIPS_TLS_DTPREL_LO16", 16}, \
     72   { &none,    46, "R_MIPS_TLS_GOTTPREL",    16}, \
     73   { &none,    47, "R_MIPS_TLS_TPREL32",     32}, \
     74   { &none,    48, "R_MIPS_TLS_TPREL64",      0}, \
     75   { &none,    49, "R_MIPS_TLS_TPREL_HI16",  16}, \
     76   { &none,    50, "R_MIPS_TLS_TPREL_LO16",  16}, \
     77   { &none,    51, "R_MIPS_GLOB_DAT",         0}
     78