xref: /netbsd-src/external/gpl3/binutils.old/dist/bfd/elfxx-tilegx.h (revision e992f068c547fd6e84b3f104dc2340adcc955732)
175fd0b74Schristos /* TILE-Gx ELF specific backend routines.
2*e992f068Schristos    Copyright (C) 2011-2022 Free Software Foundation, Inc.
375fd0b74Schristos 
475fd0b74Schristos    This file is part of BFD, the Binary File Descriptor library.
575fd0b74Schristos 
675fd0b74Schristos    This program is free software; you can redistribute it and/or modify
775fd0b74Schristos    it under the terms of the GNU General Public License as published by
875fd0b74Schristos    the Free Software Foundation; either version 3 of the License, or
975fd0b74Schristos    (at your option) any later version.
1075fd0b74Schristos 
1175fd0b74Schristos    This program is distributed in the hope that it will be useful,
1275fd0b74Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
1375fd0b74Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1475fd0b74Schristos    GNU General Public License for more details.
1575fd0b74Schristos 
1675fd0b74Schristos    You should have received a copy of the GNU General Public License
1775fd0b74Schristos    along with this program; if not, write to the Free Software
1875fd0b74Schristos    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
1975fd0b74Schristos    MA 02110-1301, USA.  */
2075fd0b74Schristos 
2175fd0b74Schristos #include "elf/common.h"
2275fd0b74Schristos #include "elf/internal.h"
2375fd0b74Schristos 
2475fd0b74Schristos extern enum elf_reloc_type_class
2575fd0b74Schristos tilegx_reloc_type_class (const struct bfd_link_info *,
2675fd0b74Schristos 			 const asection *,
2775fd0b74Schristos 			 const Elf_Internal_Rela *);
2875fd0b74Schristos 
2975fd0b74Schristos extern reloc_howto_type *
3075fd0b74Schristos tilegx_reloc_name_lookup (bfd *, const char *);
3175fd0b74Schristos 
3275fd0b74Schristos extern struct bfd_link_hash_table *
3375fd0b74Schristos tilegx_elf_link_hash_table_create (bfd *);
3475fd0b74Schristos 
3575fd0b74Schristos extern reloc_howto_type *
3675fd0b74Schristos tilegx_reloc_type_lookup (bfd *, bfd_reloc_code_real_type);
3775fd0b74Schristos 
3875fd0b74Schristos extern void
3975fd0b74Schristos tilegx_elf_copy_indirect_symbol (struct bfd_link_info *,
4075fd0b74Schristos 				 struct elf_link_hash_entry *,
4175fd0b74Schristos 				 struct elf_link_hash_entry *);
4275fd0b74Schristos 
43*e992f068Schristos extern bool
4475fd0b74Schristos tilegx_elf_create_dynamic_sections (bfd *, struct bfd_link_info *);
4575fd0b74Schristos 
46*e992f068Schristos extern bool
4775fd0b74Schristos tilegx_elf_check_relocs (bfd *, struct bfd_link_info *,
4875fd0b74Schristos 			 asection *, const Elf_Internal_Rela *);
4975fd0b74Schristos 
50*e992f068Schristos extern bool
5175fd0b74Schristos tilegx_elf_adjust_dynamic_symbol (struct bfd_link_info *,
5275fd0b74Schristos 				  struct elf_link_hash_entry *);
5375fd0b74Schristos 
54*e992f068Schristos extern bool
5575fd0b74Schristos tilegx_elf_omit_section_dynsym (bfd *,
5675fd0b74Schristos 				struct bfd_link_info *,
5775fd0b74Schristos 				asection *);
5875fd0b74Schristos 
59*e992f068Schristos extern bool
6075fd0b74Schristos tilegx_elf_size_dynamic_sections (bfd *, struct bfd_link_info *);
6175fd0b74Schristos 
62*e992f068Schristos extern int
6375fd0b74Schristos tilegx_elf_relocate_section (bfd *, struct bfd_link_info *,
6475fd0b74Schristos 			     bfd *, asection *,
6575fd0b74Schristos 			     bfd_byte *, Elf_Internal_Rela *,
6675fd0b74Schristos 			     Elf_Internal_Sym *,
6775fd0b74Schristos 			     asection **);
6875fd0b74Schristos 
6975fd0b74Schristos extern asection *
7075fd0b74Schristos tilegx_elf_gc_mark_hook (asection *,
7175fd0b74Schristos 			 struct bfd_link_info *,
7275fd0b74Schristos 			 Elf_Internal_Rela *,
7375fd0b74Schristos 			 struct elf_link_hash_entry *,
7475fd0b74Schristos 			 Elf_Internal_Sym *);
7575fd0b74Schristos 
7675fd0b74Schristos extern bfd_vma
7775fd0b74Schristos tilegx_elf_plt_sym_val (bfd_vma, const asection *, const arelent *);
7875fd0b74Schristos 
79*e992f068Schristos extern bool
8075fd0b74Schristos tilegx_info_to_howto_rela (bfd *, arelent *, Elf_Internal_Rela *);
8175fd0b74Schristos 
8275fd0b74Schristos extern int
8375fd0b74Schristos tilegx_additional_program_headers (bfd *, struct bfd_link_info *);
8475fd0b74Schristos 
85*e992f068Schristos extern bool
8675fd0b74Schristos tilegx_elf_finish_dynamic_symbol (bfd *,
8775fd0b74Schristos 				  struct bfd_link_info *,
8875fd0b74Schristos 				  struct elf_link_hash_entry *,
8975fd0b74Schristos 				  Elf_Internal_Sym *);
9075fd0b74Schristos 
91*e992f068Schristos extern bool
9275fd0b74Schristos tilegx_elf_finish_dynamic_sections (bfd *, struct bfd_link_info *);
9375fd0b74Schristos 
94*e992f068Schristos extern bool
95ede78133Schristos _bfd_tilegx_elf_merge_private_bfd_data (bfd *, struct bfd_link_info *);
96