175fd0b74Schristos /* ELF32/HPPA support 275fd0b74Schristos 375fd0b74Schristos This file contains ELF32/HPPA relocation support as specified 475fd0b74Schristos in the Stratus FTX/Golf Object File Format (SED-1762) dated 575fd0b74Schristos February 1994. 675fd0b74Schristos 7*e992f068Schristos Copyright (C) 1990-2022 Free Software Foundation, Inc. 875fd0b74Schristos 975fd0b74Schristos Written by: 1075fd0b74Schristos 1175fd0b74Schristos Center for Software Science 1275fd0b74Schristos Department of Computer Science 1375fd0b74Schristos University of Utah 1475fd0b74Schristos 1575fd0b74Schristos This file is part of BFD, the Binary File Descriptor library. 1675fd0b74Schristos 1775fd0b74Schristos This program is free software; you can redistribute it and/or modify 1875fd0b74Schristos it under the terms of the GNU General Public License as published by 1975fd0b74Schristos the Free Software Foundation; either version 3 of the License, or 2075fd0b74Schristos (at your option) any later version. 2175fd0b74Schristos 2275fd0b74Schristos This program is distributed in the hope that it will be useful, 2375fd0b74Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 2475fd0b74Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 2575fd0b74Schristos GNU General Public License for more details. 2675fd0b74Schristos 2775fd0b74Schristos You should have received a copy of the GNU General Public License 2875fd0b74Schristos along with this program; if not, write to the Free Software 2975fd0b74Schristos Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 3075fd0b74Schristos MA 02110-1301, USA. */ 3175fd0b74Schristos 3275fd0b74Schristos #ifndef _ELF32_HPPA_H 3375fd0b74Schristos #define _ELF32_HPPA_H 3475fd0b74Schristos 3575fd0b74Schristos #include "elf-bfd.h" 3675fd0b74Schristos #include "libhppa.h" 3775fd0b74Schristos #include "elf/hppa.h" 3875fd0b74Schristos 3975fd0b74Schristos #ifdef __cplusplus 4075fd0b74Schristos extern "C" { 4175fd0b74Schristos #endif 4275fd0b74Schristos 4375fd0b74Schristos void elf32_hppa_init_stub_bfd 4475fd0b74Schristos (bfd *, struct bfd_link_info *); 4575fd0b74Schristos 4675fd0b74Schristos int elf32_hppa_setup_section_lists 4775fd0b74Schristos (bfd *, struct bfd_link_info *); 4875fd0b74Schristos 4975fd0b74Schristos void elf32_hppa_next_input_section 5075fd0b74Schristos (struct bfd_link_info *, asection *); 5175fd0b74Schristos 52*e992f068Schristos bool elf32_hppa_size_stubs 53*e992f068Schristos (bfd *, bfd *, struct bfd_link_info *, bool, bfd_signed_vma, 5475fd0b74Schristos asection * (*) (const char *, asection *), void (*) (void)); 5575fd0b74Schristos 56*e992f068Schristos bool elf32_hppa_set_gp 5775fd0b74Schristos (bfd *, struct bfd_link_info *); 5875fd0b74Schristos 59*e992f068Schristos bool elf32_hppa_build_stubs 6075fd0b74Schristos (struct bfd_link_info *); 6175fd0b74Schristos 6275fd0b74Schristos elf_hppa_reloc_type elf32_hppa_reloc_final_type 6375fd0b74Schristos (bfd *, elf_hppa_reloc_type, int, unsigned int); 6475fd0b74Schristos 6575fd0b74Schristos extern elf_hppa_reloc_type ** _bfd_elf32_hppa_gen_reloc_type 6675fd0b74Schristos (bfd *, elf_hppa_reloc_type, int, unsigned int, int, asymbol *); 6775fd0b74Schristos 6875fd0b74Schristos /* Define groups of basic relocations. FIXME: These should 6975fd0b74Schristos be the only basic relocations created by GAS. The rest 7075fd0b74Schristos should be internal to the BFD backend. 7175fd0b74Schristos 7275fd0b74Schristos The idea is both SOM and ELF define these basic relocation 7375fd0b74Schristos types so they map into a SOM or ELF specific relocation 7475fd0b74Schristos as appropriate. This allows GAS to share much more code 7575fd0b74Schristos between the two target object formats. */ 7675fd0b74Schristos 7775fd0b74Schristos #define R_HPPA_NONE R_PARISC_NONE 7875fd0b74Schristos #define R_HPPA R_PARISC_DIR32 7975fd0b74Schristos #define R_HPPA_GOTOFF R_PARISC_DPREL21L 8075fd0b74Schristos #define R_HPPA_PCREL_CALL R_PARISC_PCREL21L 8175fd0b74Schristos #define R_HPPA_ABS_CALL R_PARISC_DIR17F 8275fd0b74Schristos #define R_HPPA_COMPLEX R_PARISC_UNIMPLEMENTED 8375fd0b74Schristos 8475fd0b74Schristos #ifdef __cplusplus 8575fd0b74Schristos } 8675fd0b74Schristos #endif 8775fd0b74Schristos 8875fd0b74Schristos #endif /* _ELF32_HPPA_H */ 89