1/* 32-bit ELF support for S+core. 2 Copyright (C) 2009-2017 Free Software Foundation, Inc. 3 Contributed by 4 Brain.lin (brain.lin@sunplusct.com) 5 Mei Ligang (ligang@sunnorth.com.cn) 6 Pei-Lin Tsai (pltsai@sunplus.com) 7 8 This file is part of BFD, the Binary File Descriptor library. 9 10 This program is free software; you can redistribute it and/or modify 11 it under the terms of the GNU General Public License as published by 12 the Free Software Foundation; either version 3 of the License, or 13 (at your option) any later version. 14 15 This program is distributed in the hope that it will be useful, 16 but WITHOUT ANY WARRANTY; without even the implied warranty of 17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 GNU General Public License for more details. 19 20 You should have received a copy of the GNU General Public License 21 along with this program; if not, write to the Free Software 22 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, 23 MA 02110-1301, USA. */ 24 25#include "elf/common.h" 26#include "elf/internal.h" 27 28extern void 29s7_bfd_score_elf_hide_symbol (struct bfd_link_info *, 30 struct elf_link_hash_entry *, 31 bfd_boolean); 32 33extern void 34s7_bfd_score_info_to_howto (bfd *, arelent *, Elf_Internal_Rela *); 35 36extern bfd_boolean 37s7_bfd_score_elf_relocate_section (bfd *, 38 struct bfd_link_info *, 39 bfd *, 40 asection *, 41 bfd_byte *, 42 Elf_Internal_Rela *, 43 Elf_Internal_Sym *, 44 asection **); 45 46extern bfd_boolean 47s7_bfd_score_elf_check_relocs (bfd *, 48 struct bfd_link_info *, 49 asection *, 50 const Elf_Internal_Rela *); 51 52extern bfd_boolean 53s7_bfd_score_elf_add_symbol_hook (bfd *, 54 struct bfd_link_info *, 55 Elf_Internal_Sym *, 56 const char **, 57 flagword *, 58 asection **, 59 bfd_vma *); 60 61extern void 62s7_bfd_score_elf_symbol_processing (bfd *, asymbol *); 63 64extern int 65s7_bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *, 66 const char *, 67 Elf_Internal_Sym *, 68 asection *, 69 struct elf_link_hash_entry *); 70 71extern bfd_boolean 72s7_bfd_score_elf_section_from_bfd_section (bfd *, 73 asection *, 74 int *); 75 76extern bfd_boolean 77s7_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *, 78 struct elf_link_hash_entry *); 79 80extern bfd_boolean 81s7_bfd_score_elf_always_size_sections (bfd *, struct bfd_link_info *); 82 83extern bfd_boolean 84s7_bfd_score_elf_size_dynamic_sections (bfd *, struct bfd_link_info *); 85 86extern bfd_boolean 87s7_bfd_score_elf_create_dynamic_sections (bfd *, struct bfd_link_info *); 88 89extern bfd_boolean 90s7_bfd_score_elf_finish_dynamic_symbol (bfd *, 91 struct bfd_link_info *, 92 struct elf_link_hash_entry *, 93 Elf_Internal_Sym *); 94 95extern bfd_boolean 96s7_bfd_score_elf_finish_dynamic_sections (bfd *, struct bfd_link_info *); 97 98extern bfd_boolean 99s7_bfd_score_elf_fake_sections (bfd *, 100 Elf_Internal_Shdr *, 101 asection *); 102 103extern bfd_boolean 104s7_bfd_score_elf_section_processing (bfd *, Elf_Internal_Shdr *); 105 106extern bfd_boolean 107s7_bfd_score_elf_write_section (bfd *, asection *, bfd_byte *); 108 109extern void 110s7_bfd_score_elf_copy_indirect_symbol (struct bfd_link_info *, 111 struct elf_link_hash_entry *, 112 struct elf_link_hash_entry *); 113 114extern bfd_boolean 115s7_bfd_score_elf_discard_info (bfd *, struct elf_reloc_cookie *, 116 struct bfd_link_info *); 117 118extern bfd_boolean 119s7_bfd_score_elf_ignore_discarded_relocs (asection *); 120 121extern asection * 122s7_bfd_score_elf_gc_mark_hook (asection *, 123 struct bfd_link_info *, 124 Elf_Internal_Rela *, 125 struct elf_link_hash_entry *, 126 Elf_Internal_Sym *); 127 128extern bfd_boolean 129s7_bfd_score_elf_grok_prstatus (bfd *, Elf_Internal_Note *); 130 131extern bfd_boolean 132s7_bfd_score_elf_grok_psinfo (bfd *, Elf_Internal_Note *); 133 134extern reloc_howto_type * 135s7_elf32_score_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); 136 137extern struct bfd_link_hash_table * 138s7_elf32_score_link_hash_table_create (bfd *); 139 140extern bfd_boolean 141s7_elf32_score_print_private_bfd_data (bfd *, void *); 142 143extern bfd_boolean 144s7_elf32_score_merge_private_bfd_data (bfd *, struct bfd_link_info *); 145 146extern bfd_boolean 147s7_elf32_score_new_section_hook (bfd *, asection *); 148 149extern bfd_boolean 150_bfd_score_elf_common_definition (Elf_Internal_Sym *); 151 152#define elf_backend_common_definition _bfd_score_elf_common_definition 153