1 /* C-SKY ELF support for BFD. 2 Copyright (C) 1998-2020 Free Software Foundation, Inc. 3 Contributed by C-SKY Microsystems and Mentor Graphics. 4 5 This file is part of BFD, the Binary File Descriptor library. 6 7 This program is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 3 of the License, or 10 (at your option) any later version. 11 12 This program is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with this program; if not, write to the Free Software Foundation, 19 Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 20 21 #ifndef _ELF_CSKY_H 22 #define _ELF_CSKY_H 23 24 #include "elf/reloc-macros.h" 25 26 /* Values of relocation types according to the ABI doc. 27 The order should be consistent with csky bfd reloc type 28 table in bfd-in2.h. */ 29 START_RELOC_NUMBERS (elf_csky_reloc_type) 30 RELOC_NUMBER (R_CKCORE_NONE,0) 31 RELOC_NUMBER (R_CKCORE_ADDR32,1) 32 RELOC_NUMBER (R_CKCORE_PCREL_IMM8BY4,2) 33 RELOC_NUMBER (R_CKCORE_PCREL_IMM11BY2,3) 34 RELOC_NUMBER (R_CKCORE_PCREL_IMM4BY2,4) 35 RELOC_NUMBER (R_CKCORE_PCREL32,5) 36 RELOC_NUMBER (R_CKCORE_PCREL_JSR_IMM11BY2,6) 37 RELOC_NUMBER (R_CKCORE_GNU_VTINHERIT,7) 38 RELOC_NUMBER (R_CKCORE_GNU_VTENTRY,8) 39 RELOC_NUMBER (R_CKCORE_RELATIVE,9) 40 RELOC_NUMBER (R_CKCORE_COPY,10) 41 RELOC_NUMBER (R_CKCORE_GLOB_DAT,11) 42 RELOC_NUMBER (R_CKCORE_JUMP_SLOT,12) 43 RELOC_NUMBER (R_CKCORE_GOTOFF,13) 44 RELOC_NUMBER (R_CKCORE_GOTPC,14) 45 RELOC_NUMBER (R_CKCORE_GOT32,15) 46 RELOC_NUMBER (R_CKCORE_PLT32,16) 47 RELOC_NUMBER (R_CKCORE_ADDRGOT,17) 48 RELOC_NUMBER (R_CKCORE_ADDRPLT,18) 49 RELOC_NUMBER (R_CKCORE_PCREL_IMM26BY2,19) 50 RELOC_NUMBER (R_CKCORE_PCREL_IMM16BY2,20) 51 RELOC_NUMBER (R_CKCORE_PCREL_IMM16BY4,21) 52 RELOC_NUMBER (R_CKCORE_PCREL_IMM10BY2,22) 53 RELOC_NUMBER (R_CKCORE_PCREL_IMM10BY4,23) 54 RELOC_NUMBER (R_CKCORE_ADDR_HI16,24) 55 RELOC_NUMBER (R_CKCORE_ADDR_LO16,25) 56 RELOC_NUMBER (R_CKCORE_GOTPC_HI16,26) 57 RELOC_NUMBER (R_CKCORE_GOTPC_LO16,27) 58 RELOC_NUMBER (R_CKCORE_GOTOFF_HI16,28) 59 RELOC_NUMBER (R_CKCORE_GOTOFF_LO16,29) 60 RELOC_NUMBER (R_CKCORE_GOT12,30) 61 RELOC_NUMBER (R_CKCORE_GOT_HI16,31) 62 RELOC_NUMBER (R_CKCORE_GOT_LO16,32) 63 RELOC_NUMBER (R_CKCORE_PLT12,33) 64 RELOC_NUMBER (R_CKCORE_PLT_HI16,34) 65 RELOC_NUMBER (R_CKCORE_PLT_LO16,35) 66 RELOC_NUMBER (R_CKCORE_ADDRGOT_HI16,36) 67 RELOC_NUMBER (R_CKCORE_ADDRGOT_LO16,37) 68 RELOC_NUMBER (R_CKCORE_ADDRPLT_HI16,38) 69 RELOC_NUMBER (R_CKCORE_ADDRPLT_LO16,39) 70 RELOC_NUMBER (R_CKCORE_PCREL_JSR_IMM26BY2,40) 71 RELOC_NUMBER (R_CKCORE_TOFFSET_LO16, 41) 72 RELOC_NUMBER (R_CKCORE_DOFFSET_LO16, 42) 73 RELOC_NUMBER (R_CKCORE_PCREL_IMM18BY2, 43) 74 RELOC_NUMBER (R_CKCORE_DOFFSET_IMM18, 44) 75 RELOC_NUMBER (R_CKCORE_DOFFSET_IMM18BY2, 45) 76 RELOC_NUMBER (R_CKCORE_DOFFSET_IMM18BY4, 46) 77 RELOC_NUMBER (R_CKCORE_GOTOFF_IMM18, 47) 78 RELOC_NUMBER (R_CKCORE_GOT_IMM18BY4, 48) 79 RELOC_NUMBER (R_CKCORE_PLT_IMM18BY4, 49) 80 RELOC_NUMBER (R_CKCORE_PCREL_IMM7BY4, 50) 81 RELOC_NUMBER (R_CKCORE_TLS_LE32, 51) 82 RELOC_NUMBER (R_CKCORE_TLS_IE32, 52) 83 RELOC_NUMBER (R_CKCORE_TLS_GD32, 53) 84 RELOC_NUMBER (R_CKCORE_TLS_LDM32, 54) 85 RELOC_NUMBER (R_CKCORE_TLS_LDO32, 55) 86 RELOC_NUMBER (R_CKCORE_TLS_DTPMOD32, 56) 87 RELOC_NUMBER (R_CKCORE_TLS_DTPOFF32, 57) 88 RELOC_NUMBER (R_CKCORE_TLS_TPOFF32, 58) 89 RELOC_NUMBER (R_CKCORE_PCREL_FLRW_IMM8BY4, 59) 90 RELOC_NUMBER (R_CKCORE_NOJSRI, 60) 91 RELOC_NUMBER (R_CKCORE_CALLGRAPH, 61) 92 RELOC_NUMBER (R_CKCORE_IRELATIVE, 62) 93 RELOC_NUMBER (R_CKCORE_PCREL_BLOOP_IMM4BY4, 63) 94 RELOC_NUMBER (R_CKCORE_PCREL_BLOOP_IMM12BY4, 64) 95 END_RELOC_NUMBERS (R_CKCORE_MAX) 96 97 #endif /* _ELF_CSKY_H */ 98