12a6b7db3Sskrll /* H8300/h8500 ELF support for BFD. 2*cb63e24eSchristos Copyright (C) 2001-2024 Free Software Foundation, Inc. 32a6b7db3Sskrll 42a6b7db3Sskrll This file is part of BFD, the Binary File Descriptor library. 52a6b7db3Sskrll 62a6b7db3Sskrll This program is free software; you can redistribute it and/or modify 72a6b7db3Sskrll it under the terms of the GNU General Public License as published by 845548106Schristos the Free Software Foundation; either version 3 of the License, or 92a6b7db3Sskrll (at your option) any later version. 102a6b7db3Sskrll 112a6b7db3Sskrll This program is distributed in the hope that it will be useful, 122a6b7db3Sskrll but WITHOUT ANY WARRANTY; without even the implied warranty of 132a6b7db3Sskrll MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 142a6b7db3Sskrll GNU General Public License for more details. 152a6b7db3Sskrll 162a6b7db3Sskrll You should have received a copy of the GNU General Public License 172a6b7db3Sskrll along with this program; if not, write to the Free Software Foundation, 182a6b7db3Sskrll Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ 192a6b7db3Sskrll 202a6b7db3Sskrll #ifndef _ELF_H8_H 212a6b7db3Sskrll #define _ELF_H8_H 222a6b7db3Sskrll 232a6b7db3Sskrll #include "elf/reloc-macros.h" 242a6b7db3Sskrll 252a6b7db3Sskrll /* Relocations. */ 269573673dSchristos /* Relocations 59..64 are GNU extensions. */ 272a6b7db3Sskrll START_RELOC_NUMBERS (elf_h8_reloc_type) 282a6b7db3Sskrll RELOC_NUMBER (R_H8_NONE, 0) 292a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR32, 1) 302a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR32_28, 2) 312a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR32_24, 3) 322a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR32_16, 4) 332a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR32U, 6) 342a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR32U_28, 7) 352a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR32U_24, 8) 362a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR32U_20, 9) 372a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR32U_16, 10) 382a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR24, 11) 392a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR24_20, 12) 402a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR24_16, 13) 412a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR24U, 14) 422a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR24U_20, 15) 432a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR24U_16, 16) 442a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR16, 17) 452a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR16U, 18) 462a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR16S_32, 19) 472a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR16S_28, 20) 482a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR16S_24, 21) 492a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR16S_20, 22) 502a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR16S, 23) 512a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR8, 24) 522a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR8U, 25) 532a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR8Z_32, 26) 542a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR8Z_28, 27) 552a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR8Z_24, 28) 562a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR8Z_20, 29) 572a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR8Z_16, 30) 582a6b7db3Sskrll RELOC_NUMBER (R_H8_PCREL16, 31) 592a6b7db3Sskrll RELOC_NUMBER (R_H8_PCREL8, 32) 602a6b7db3Sskrll RELOC_NUMBER (R_H8_BPOS, 33) 612a6b7db3Sskrll FAKE_RELOC (R_H8_FIRST_INVALID_DIR_RELOC, 34) 622a6b7db3Sskrll FAKE_RELOC (R_H8_LAST_INVALID_DIR_RELOC, 58) 632a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR16A8, 59) 642a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR16R8, 60) 652a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR24A8, 61) 662a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR24R8, 62) 672a6b7db3Sskrll RELOC_NUMBER (R_H8_DIR32A16, 63) 689573673dSchristos RELOC_NUMBER (R_H8_DISP32A16, 64) 692a6b7db3Sskrll RELOC_NUMBER (R_H8_ABS32, 65) 702a6b7db3Sskrll RELOC_NUMBER (R_H8_ABS32A16, 127) 712a6b7db3Sskrll RELOC_NUMBER (R_H8_SYM, 128) 722a6b7db3Sskrll RELOC_NUMBER (R_H8_OPneg, 129) 732a6b7db3Sskrll RELOC_NUMBER (R_H8_OPadd, 130) 742a6b7db3Sskrll RELOC_NUMBER (R_H8_OPsub, 131) 752a6b7db3Sskrll RELOC_NUMBER (R_H8_OPmul, 132) 762a6b7db3Sskrll RELOC_NUMBER (R_H8_OPdiv, 133) 772a6b7db3Sskrll RELOC_NUMBER (R_H8_OPshla, 134) 782a6b7db3Sskrll RELOC_NUMBER (R_H8_OPshra, 135) 792a6b7db3Sskrll RELOC_NUMBER (R_H8_OPsctsize, 136) 802a6b7db3Sskrll RELOC_NUMBER (R_H8_OPhword, 137) 812a6b7db3Sskrll RELOC_NUMBER (R_H8_OPlword, 138) 822a6b7db3Sskrll RELOC_NUMBER (R_H8_OPhigh, 139) 832a6b7db3Sskrll RELOC_NUMBER (R_H8_OPlow, 140) 842a6b7db3Sskrll RELOC_NUMBER (R_H8_OPscttop, 141) 852a6b7db3Sskrll END_RELOC_NUMBERS (R_H8_max) 862a6b7db3Sskrll 872a6b7db3Sskrll /* Machine variant if we know it. This field was invented at Cygnus, 882a6b7db3Sskrll but it is hoped that other vendors will adopt it. If some standard 892a6b7db3Sskrll is developed, this code should be changed to follow it. */ 902a6b7db3Sskrll 912a6b7db3Sskrll #define EF_H8_MACH 0x00FF0000 922a6b7db3Sskrll 932a6b7db3Sskrll #define E_H8_MACH_H8300 0x00800000 942a6b7db3Sskrll #define E_H8_MACH_H8300H 0x00810000 952a6b7db3Sskrll #define E_H8_MACH_H8300S 0x00820000 962a6b7db3Sskrll #define E_H8_MACH_H8300HN 0x00830000 972a6b7db3Sskrll #define E_H8_MACH_H8300SN 0x00840000 982a6b7db3Sskrll #define E_H8_MACH_H8300SX 0x00850000 992a6b7db3Sskrll #define E_H8_MACH_H8300SXN 0x00860000 1002a6b7db3Sskrll 1012a6b7db3Sskrll #endif 102