]>
Commit | Line | Data |
---|---|---|
c3b7224a | 1 | /* 32-bit ELF support for S+core. |
250d07de | 2 | Copyright (C) 2009-2021 Free Software Foundation, Inc. |
c3b7224a NC |
3 | Contributed by |
4 | Brain.lin ([email protected]) | |
5 | Mei Ligang ([email protected]) | |
6 | Pei-Lin Tsai ([email protected]) | |
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 | ||
28 | extern void | |
29 | s7_bfd_score_elf_hide_symbol (struct bfd_link_info *, | |
07d6d2b8 | 30 | struct elf_link_hash_entry *, |
0a1b45a2 | 31 | bool); |
c3b7224a | 32 | |
0a1b45a2 | 33 | extern bool |
c3b7224a NC |
34 | s7_bfd_score_info_to_howto (bfd *, arelent *, Elf_Internal_Rela *); |
35 | ||
0f684201 | 36 | extern int |
c3b7224a | 37 | s7_bfd_score_elf_relocate_section (bfd *, |
07d6d2b8 AM |
38 | struct bfd_link_info *, |
39 | bfd *, | |
40 | asection *, | |
41 | bfd_byte *, | |
42 | Elf_Internal_Rela *, | |
43 | Elf_Internal_Sym *, | |
44 | asection **); | |
c3b7224a | 45 | |
0a1b45a2 | 46 | extern bool |
c3b7224a | 47 | s7_bfd_score_elf_check_relocs (bfd *, |
07d6d2b8 AM |
48 | struct bfd_link_info *, |
49 | asection *, | |
50 | const Elf_Internal_Rela *); | |
c3b7224a | 51 | |
0a1b45a2 | 52 | extern bool |
c3b7224a | 53 | s7_bfd_score_elf_add_symbol_hook (bfd *, |
07d6d2b8 AM |
54 | struct bfd_link_info *, |
55 | Elf_Internal_Sym *, | |
56 | const char **, | |
57 | flagword *, | |
58 | asection **, | |
59 | bfd_vma *); | |
c3b7224a NC |
60 | |
61 | extern void | |
62 | s7_bfd_score_elf_symbol_processing (bfd *, asymbol *); | |
63 | ||
6e0b88f1 | 64 | extern int |
c3b7224a | 65 | s7_bfd_score_elf_link_output_symbol_hook (struct bfd_link_info *, |
07d6d2b8 AM |
66 | const char *, |
67 | Elf_Internal_Sym *, | |
68 | asection *, | |
69 | struct elf_link_hash_entry *); | |
c3b7224a | 70 | |
0a1b45a2 | 71 | extern bool |
c3b7224a | 72 | s7_bfd_score_elf_section_from_bfd_section (bfd *, |
07d6d2b8 AM |
73 | asection *, |
74 | int *); | |
c3b7224a | 75 | |
0a1b45a2 | 76 | extern bool |
c3b7224a | 77 | s7_bfd_score_elf_adjust_dynamic_symbol (struct bfd_link_info *, |
07d6d2b8 | 78 | struct elf_link_hash_entry *); |
c3b7224a | 79 | |
0a1b45a2 | 80 | extern bool |
c3b7224a NC |
81 | s7_bfd_score_elf_always_size_sections (bfd *, struct bfd_link_info *); |
82 | ||
0a1b45a2 | 83 | extern bool |
c3b7224a NC |
84 | s7_bfd_score_elf_size_dynamic_sections (bfd *, struct bfd_link_info *); |
85 | ||
0a1b45a2 | 86 | extern bool |
c3b7224a NC |
87 | s7_bfd_score_elf_create_dynamic_sections (bfd *, struct bfd_link_info *); |
88 | ||
0a1b45a2 | 89 | extern bool |
c3b7224a | 90 | s7_bfd_score_elf_finish_dynamic_symbol (bfd *, |
07d6d2b8 AM |
91 | struct bfd_link_info *, |
92 | struct elf_link_hash_entry *, | |
93 | Elf_Internal_Sym *); | |
c3b7224a | 94 | |
0a1b45a2 | 95 | extern bool |
c3b7224a NC |
96 | s7_bfd_score_elf_finish_dynamic_sections (bfd *, struct bfd_link_info *); |
97 | ||
0a1b45a2 | 98 | extern bool |
c3b7224a | 99 | s7_bfd_score_elf_fake_sections (bfd *, |
07d6d2b8 AM |
100 | Elf_Internal_Shdr *, |
101 | asection *); | |
c3b7224a | 102 | |
0a1b45a2 | 103 | extern bool |
c3b7224a NC |
104 | s7_bfd_score_elf_section_processing (bfd *, Elf_Internal_Shdr *); |
105 | ||
0a1b45a2 | 106 | extern bool |
c3b7224a NC |
107 | s7_bfd_score_elf_write_section (bfd *, asection *, bfd_byte *); |
108 | ||
109 | extern void | |
110 | s7_bfd_score_elf_copy_indirect_symbol (struct bfd_link_info *, | |
07d6d2b8 AM |
111 | struct elf_link_hash_entry *, |
112 | struct elf_link_hash_entry *); | |
c3b7224a | 113 | |
0a1b45a2 | 114 | extern bool |
c3b7224a | 115 | s7_bfd_score_elf_discard_info (bfd *, struct elf_reloc_cookie *, |
07d6d2b8 | 116 | struct bfd_link_info *); |
c3b7224a | 117 | |
0a1b45a2 | 118 | extern bool |
c3b7224a NC |
119 | s7_bfd_score_elf_ignore_discarded_relocs (asection *); |
120 | ||
121 | extern asection * | |
122 | s7_bfd_score_elf_gc_mark_hook (asection *, | |
07d6d2b8 AM |
123 | struct bfd_link_info *, |
124 | Elf_Internal_Rela *, | |
125 | struct elf_link_hash_entry *, | |
126 | Elf_Internal_Sym *); | |
c3b7224a | 127 | |
0a1b45a2 | 128 | extern bool |
c3b7224a NC |
129 | s7_bfd_score_elf_grok_prstatus (bfd *, Elf_Internal_Note *); |
130 | ||
0a1b45a2 | 131 | extern bool |
c3b7224a NC |
132 | s7_bfd_score_elf_grok_psinfo (bfd *, Elf_Internal_Note *); |
133 | ||
134 | extern reloc_howto_type * | |
135 | s7_elf32_score_reloc_type_lookup (bfd *, bfd_reloc_code_real_type); | |
136 | ||
137 | extern struct bfd_link_hash_table * | |
138 | s7_elf32_score_link_hash_table_create (bfd *); | |
139 | ||
0a1b45a2 | 140 | extern bool |
c3b7224a NC |
141 | s7_elf32_score_print_private_bfd_data (bfd *, void *); |
142 | ||
0a1b45a2 | 143 | extern bool |
50e03d47 | 144 | s7_elf32_score_merge_private_bfd_data (bfd *, struct bfd_link_info *); |
c3b7224a | 145 | |
0a1b45a2 | 146 | extern bool |
c3b7224a NC |
147 | s7_elf32_score_new_section_hook (bfd *, asection *); |
148 | ||
0a1b45a2 | 149 | extern bool |
c3b7224a NC |
150 | _bfd_score_elf_common_definition (Elf_Internal_Sym *); |
151 | ||
152 | #define elf_backend_common_definition _bfd_score_elf_common_definition |