Commit | Line | Data |
---|---|---|
c618de01 SC |
1 | /* libbfd.h -- Declarations used by bfd library *implementation*. |
2 | (This include file is not for users of the library.) | |
53d3ce37 | 3 | Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc. |
c618de01 | 4 | Written by Cygnus Support. |
fc723380 | 5 | |
e914ed52 ILT |
6 | ** NOTE: libbfd.h is a GENERATED file. Don't change it; instead, |
7 | ** change libbfd-in.h or the other BFD source files processed to | |
8 | ** generate this file. | |
9 | ||
c618de01 | 10 | This file is part of BFD, the Binary File Descriptor library. |
4a81b561 | 11 | |
c618de01 | 12 | This program is free software; you can redistribute it and/or modify |
4a81b561 | 13 | it under the terms of the GNU General Public License as published by |
c618de01 SC |
14 | the Free Software Foundation; either version 2 of the License, or |
15 | (at your option) any later version. | |
4a81b561 | 16 | |
c618de01 | 17 | This program is distributed in the hope that it will be useful, |
4a81b561 DHW |
18 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 | GNU General Public License for more details. | |
21 | ||
22 | You should have received a copy of the GNU General Public License | |
c618de01 | 23 | along with this program; if not, write to the Free Software |
4e98461f | 24 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ |
4a81b561 | 25 | |
53d3ce37 TT |
26 | #ifdef ENABLE_NLS |
27 | #include <libintl.h> | |
28 | /* FIXME: We might want to use dgettext instead, in some cases. | |
29 | This is still under investigation. */ | |
30 | #define _(String) gettext (String) | |
31 | #ifdef gettext_noop | |
32 | #define N_(String) gettext_noop (String) | |
33 | #else | |
34 | #define N_(String) (String) | |
35 | #endif | |
36 | #else | |
37 | /* Stubs that do something close enough. */ | |
38 | #define textdomain(String) (String) | |
39 | #define gettext(String) (String) | |
40 | #define dgettext(Domain,Message) (Message) | |
41 | #define dcgettext(Domain,Message,Type) (Message) | |
42 | #define bindtextdomain(Domain,Directory) (Domain) | |
43 | #define _(String) (String) | |
44 | #define N_(String) (String) | |
45 | /* In this case we don't care about the value. */ | |
46 | #ifndef LC_MESSAGES | |
47 | #define LC_MESSAGES 0 | |
48 | #endif | |
49 | #endif | |
50 | ||
01dd1b2b | 51 | /* Align an address upward to a boundary, expressed as a number of bytes. |
29b7118a MM |
52 | E.g. align to an 8-byte boundary with argument of 8. Take care never |
53 | to wrap around if the address is within boundary-1 of the end of the | |
54 | address space. */ | |
55 | #define BFD_ALIGN(this, boundary) \ | |
53d3ce37 TT |
56 | ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \ |
57 | ? (((bfd_vma) (this) + ((boundary) - 1)) & (~((boundary)-1))) \ | |
29b7118a | 58 | : ~ (bfd_vma) 0) |
01dd1b2b | 59 | |
4a81b561 DHW |
60 | /* If you want to read and write large blocks, you might want to do it |
61 | in quanta of this amount */ | |
62 | #define DEFAULT_BUFFERSIZE 8192 | |
63 | ||
fc723380 JG |
64 | /* Set a tdata field. Can't use the other macros for this, since they |
65 | do casts, and casting to the left of assignment isn't portable. */ | |
d5cd3c0e | 66 | #define set_tdata(bfd, v) ((bfd)->tdata.any = (PTR) (v)) |
fc723380 | 67 | |
64d5f5d0 ILT |
68 | /* If BFD_IN_MEMORY is set for a BFD, then the iostream fields points |
69 | to an instance of this structure. */ | |
70 | ||
71 | struct bfd_in_memory | |
72 | { | |
73 | /* Size of buffer. */ | |
74 | bfd_size_type size; | |
75 | /* Buffer holding contents of BFD. */ | |
76 | bfd_byte *buffer; | |
77 | }; | |
78 | ||
fc723380 JG |
79 | /* tdata for an archive. For an input archive, cache |
80 | needs to be free()'d. For an output archive, symdefs do. */ | |
4a81b561 DHW |
81 | |
82 | struct artdata { | |
83 | file_ptr first_file_filepos; | |
84 | /* Speed up searching the armap */ | |
85 | struct ar_cache *cache; | |
86 | bfd *archive_head; /* Only interesting in output routines */ | |
87 | carsym *symdefs; /* the symdef entries */ | |
88 | symindex symdef_count; /* how many there are */ | |
89 | char *extended_names; /* clever intel extension */ | |
c188b0be DM |
90 | /* when more compilers are standard C, this can be a time_t */ |
91 | long armap_timestamp; /* Timestamp value written into armap. | |
b5b4294e JG |
92 | This is used for BSD archives to check |
93 | that the timestamp is recent enough | |
94 | for the BSD linker to not complain, | |
95 | just before we finish writing an | |
96 | archive. */ | |
97 | file_ptr armap_datepos; /* Position within archive to seek to | |
98 | rewrite the date field. */ | |
b59f0276 | 99 | PTR tdata; /* Backend specific information. */ |
4a81b561 DHW |
100 | }; |
101 | ||
e98e6ec1 | 102 | #define bfd_ardata(bfd) ((bfd)->tdata.aout_ar_data) |
4a81b561 DHW |
103 | |
104 | /* Goes in bfd's arelt_data slot */ | |
105 | struct areltdata { | |
106 | char * arch_header; /* it's actually a string */ | |
107 | unsigned int parsed_size; /* octets of filesize not including ar_hdr */ | |
108 | char *filename; /* null-terminated */ | |
109 | }; | |
110 | ||
111 | #define arelt_size(bfd) (((struct areltdata *)((bfd)->arelt_data))->parsed_size) | |
112 | ||
64d5f5d0 ILT |
113 | extern PTR bfd_malloc PARAMS ((size_t)); |
114 | extern PTR bfd_realloc PARAMS ((PTR, size_t)); | |
115 | extern PTR bfd_zmalloc PARAMS ((size_t)); | |
9846338e | 116 | |
4e98461f SC |
117 | extern bfd_error_handler_type _bfd_error_handler; |
118 | ||
37bdd624 | 119 | /* These routines allocate and free things on the BFD's objalloc. */ |
4a81b561 | 120 | |
37bdd624 DE |
121 | extern PTR bfd_alloc PARAMS ((bfd *, size_t)); |
122 | extern PTR bfd_zalloc PARAMS ((bfd *, size_t)); | |
123 | extern void bfd_release PARAMS ((bfd *, PTR)); | |
287c221d | 124 | |
287c221d | 125 | bfd * _bfd_create_empty_archive_element_shell PARAMS ((bfd *obfd)); |
f4bd7a8f | 126 | bfd * _bfd_look_for_bfd_in_cache PARAMS ((bfd *arch_bfd, file_ptr index)); |
b59f0276 | 127 | boolean _bfd_add_bfd_to_archive_cache PARAMS ((bfd *, file_ptr, bfd *)); |
287c221d | 128 | boolean _bfd_generic_mkarchive PARAMS ((bfd *abfd)); |
e914ed52 | 129 | const bfd_target *bfd_generic_archive_p PARAMS ((bfd *abfd)); |
287c221d | 130 | boolean bfd_slurp_armap PARAMS ((bfd *abfd)); |
898728d4 | 131 | boolean bfd_slurp_bsd_armap_f2 PARAMS ((bfd *abfd)); |
287c221d PB |
132 | #define bfd_slurp_bsd_armap bfd_slurp_armap |
133 | #define bfd_slurp_coff_armap bfd_slurp_armap | |
134 | boolean _bfd_slurp_extended_name_table PARAMS ((bfd *abfd)); | |
fca2b81b KR |
135 | extern boolean _bfd_construct_extended_name_table |
136 | PARAMS ((bfd *, boolean, char **, bfd_size_type *)); | |
287c221d | 137 | boolean _bfd_write_archive_contents PARAMS ((bfd *abfd)); |
c53fac12 | 138 | boolean _bfd_compute_and_write_armap PARAMS ((bfd *, unsigned int elength)); |
f4bd7a8f | 139 | bfd *_bfd_get_elt_at_filepos PARAMS ((bfd *archive, file_ptr filepos)); |
64d5f5d0 | 140 | extern bfd *_bfd_generic_get_elt_at_index PARAMS ((bfd *, symindex)); |
f4bd7a8f | 141 | bfd * _bfd_new_bfd PARAMS ((void)); |
4a81b561 | 142 | |
287c221d PB |
143 | boolean bfd_false PARAMS ((bfd *ignore)); |
144 | boolean bfd_true PARAMS ((bfd *ignore)); | |
145 | PTR bfd_nullvoidptr PARAMS ((bfd *ignore)); | |
146 | int bfd_0 PARAMS ((bfd *ignore)); | |
147 | unsigned int bfd_0u PARAMS ((bfd *ignore)); | |
326e32d7 | 148 | long bfd_0l PARAMS ((bfd *ignore)); |
6812b607 | 149 | long _bfd_n1 PARAMS ((bfd *ignore)); |
287c221d PB |
150 | void bfd_void PARAMS ((bfd *ignore)); |
151 | ||
e914ed52 ILT |
152 | bfd *_bfd_new_bfd_contained_in PARAMS ((bfd *)); |
153 | const bfd_target *_bfd_dummy_target PARAMS ((bfd *abfd)); | |
4a81b561 | 154 | |
287c221d | 155 | void bfd_dont_truncate_arname PARAMS ((bfd *abfd, CONST char *filename, |
69ebee86 | 156 | char *hdr)); |
287c221d | 157 | void bfd_bsd_truncate_arname PARAMS ((bfd *abfd, CONST char *filename, |
69ebee86 | 158 | char *hdr)); |
287c221d | 159 | void bfd_gnu_truncate_arname PARAMS ((bfd *abfd, CONST char *filename, |
69ebee86 | 160 | char *hdr)); |
4a81b561 | 161 | |
287c221d | 162 | boolean bsd_write_armap PARAMS ((bfd *arch, unsigned int elength, |
01dd1b2b | 163 | struct orl *map, unsigned int orl_count, int stridx)); |
4a81b561 | 164 | |
287c221d | 165 | boolean coff_write_armap PARAMS ((bfd *arch, unsigned int elength, |
01dd1b2b | 166 | struct orl *map, unsigned int orl_count, int stridx)); |
4a81b561 | 167 | |
c53fac12 ILT |
168 | extern PTR _bfd_generic_read_ar_hdr PARAMS ((bfd *)); |
169 | ||
64d5f5d0 ILT |
170 | extern PTR _bfd_generic_read_ar_hdr_mag PARAMS ((bfd *, const char *)); |
171 | ||
287c221d | 172 | bfd * bfd_generic_openr_next_archived_file PARAMS ((bfd *archive, |
2203f786 | 173 | bfd *last_file)); |
4a81b561 | 174 | |
287c221d | 175 | int bfd_generic_stat_arch_elt PARAMS ((bfd *, struct stat *)); |
fc723380 | 176 | |
c53fac12 | 177 | #define _bfd_read_ar_hdr(abfd) \ |
64d5f5d0 | 178 | BFD_SEND (abfd, _bfd_read_ar_hdr_fn, (abfd)) |
6812b607 ILT |
179 | \f |
180 | /* Generic routines to use for BFD_JUMP_TABLE_GENERIC. Use | |
181 | BFD_JUMP_TABLE_GENERIC (_bfd_generic). */ | |
182 | ||
183 | #define _bfd_generic_close_and_cleanup bfd_true | |
184 | #define _bfd_generic_bfd_free_cached_info bfd_true | |
185 | #define _bfd_generic_new_section_hook \ | |
186 | ((boolean (*) PARAMS ((bfd *, asection *))) bfd_true) | |
187 | extern boolean _bfd_generic_get_section_contents | |
188 | PARAMS ((bfd *, asection *, PTR location, file_ptr offset, | |
189 | bfd_size_type count)); | |
64d5f5d0 ILT |
190 | extern boolean _bfd_generic_get_section_contents_in_window |
191 | PARAMS ((bfd *, asection *, bfd_window *, file_ptr, bfd_size_type)); | |
6812b607 ILT |
192 | |
193 | /* Generic routines to use for BFD_JUMP_TABLE_COPY. Use | |
194 | BFD_JUMP_TABLE_COPY (_bfd_generic). */ | |
195 | ||
196 | #define _bfd_generic_bfd_copy_private_bfd_data \ | |
197 | ((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true) | |
4e98461f SC |
198 | #define _bfd_generic_bfd_merge_private_bfd_data \ |
199 | ((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true) | |
200 | #define _bfd_generic_bfd_set_private_flags \ | |
201 | ((boolean (*) PARAMS ((bfd *, flagword))) bfd_true) | |
6812b607 ILT |
202 | #define _bfd_generic_bfd_copy_private_section_data \ |
203 | ((boolean (*) PARAMS ((bfd *, asection *, bfd *, asection *))) bfd_true) | |
4e98461f SC |
204 | #define _bfd_generic_bfd_copy_private_symbol_data \ |
205 | ((boolean (*) PARAMS ((bfd *, asymbol *, bfd *, asymbol *))) bfd_true) | |
206 | #define _bfd_generic_bfd_print_private_bfd_data \ | |
64d5f5d0 | 207 | ((boolean (*) PARAMS ((bfd *, PTR))) bfd_true) |
6812b607 ILT |
208 | |
209 | /* Routines to use for BFD_JUMP_TABLE_CORE when there is no core file | |
210 | support. Use BFD_JUMP_TABLE_CORE (_bfd_nocore). */ | |
211 | ||
212 | extern char *_bfd_nocore_core_file_failing_command PARAMS ((bfd *)); | |
213 | extern int _bfd_nocore_core_file_failing_signal PARAMS ((bfd *)); | |
214 | extern boolean _bfd_nocore_core_file_matches_executable_p | |
215 | PARAMS ((bfd *, bfd *)); | |
216 | ||
217 | /* Routines to use for BFD_JUMP_TABLE_ARCHIVE when there is no archive | |
218 | file support. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive). */ | |
219 | ||
220 | #define _bfd_noarchive_slurp_armap bfd_false | |
221 | #define _bfd_noarchive_slurp_extended_name_table bfd_false | |
fca2b81b KR |
222 | #define _bfd_noarchive_construct_extended_name_table \ |
223 | ((boolean (*) PARAMS ((bfd *, char **, bfd_size_type *, const char **))) \ | |
224 | bfd_false) | |
6812b607 ILT |
225 | #define _bfd_noarchive_truncate_arname \ |
226 | ((void (*) PARAMS ((bfd *, const char *, char *))) bfd_void) | |
227 | #define _bfd_noarchive_write_armap \ | |
228 | ((boolean (*) \ | |
229 | PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int))) \ | |
230 | bfd_false) | |
c53fac12 | 231 | #define _bfd_noarchive_read_ar_hdr bfd_nullvoidptr |
6812b607 ILT |
232 | #define _bfd_noarchive_openr_next_archived_file \ |
233 | ((bfd *(*) PARAMS ((bfd *, bfd *))) bfd_nullvoidptr) | |
64d5f5d0 ILT |
234 | #define _bfd_noarchive_get_elt_at_index \ |
235 | ((bfd *(*) PARAMS ((bfd *, symindex))) bfd_nullvoidptr) | |
6812b607 | 236 | #define _bfd_noarchive_generic_stat_arch_elt bfd_generic_stat_arch_elt |
0443af31 | 237 | #define _bfd_noarchive_update_armap_timestamp bfd_false |
6812b607 ILT |
238 | |
239 | /* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get BSD style | |
240 | archives. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_bsd). */ | |
241 | ||
242 | #define _bfd_archive_bsd_slurp_armap bfd_slurp_bsd_armap | |
243 | #define _bfd_archive_bsd_slurp_extended_name_table \ | |
244 | _bfd_slurp_extended_name_table | |
fca2b81b KR |
245 | extern boolean _bfd_archive_bsd_construct_extended_name_table |
246 | PARAMS ((bfd *, char **, bfd_size_type *, const char **)); | |
6812b607 ILT |
247 | #define _bfd_archive_bsd_truncate_arname bfd_bsd_truncate_arname |
248 | #define _bfd_archive_bsd_write_armap bsd_write_armap | |
c53fac12 | 249 | #define _bfd_archive_bsd_read_ar_hdr _bfd_generic_read_ar_hdr |
6812b607 ILT |
250 | #define _bfd_archive_bsd_openr_next_archived_file \ |
251 | bfd_generic_openr_next_archived_file | |
64d5f5d0 | 252 | #define _bfd_archive_bsd_get_elt_at_index _bfd_generic_get_elt_at_index |
6812b607 ILT |
253 | #define _bfd_archive_bsd_generic_stat_arch_elt \ |
254 | bfd_generic_stat_arch_elt | |
0443af31 | 255 | extern boolean _bfd_archive_bsd_update_armap_timestamp PARAMS ((bfd *)); |
6812b607 ILT |
256 | |
257 | /* Routines to use for BFD_JUMP_TABLE_ARCHIVE to get COFF style | |
258 | archives. Use BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff). */ | |
259 | ||
260 | #define _bfd_archive_coff_slurp_armap bfd_slurp_coff_armap | |
261 | #define _bfd_archive_coff_slurp_extended_name_table \ | |
262 | _bfd_slurp_extended_name_table | |
fca2b81b KR |
263 | extern boolean _bfd_archive_coff_construct_extended_name_table |
264 | PARAMS ((bfd *, char **, bfd_size_type *, const char **)); | |
6812b607 ILT |
265 | #define _bfd_archive_coff_truncate_arname bfd_dont_truncate_arname |
266 | #define _bfd_archive_coff_write_armap coff_write_armap | |
c53fac12 | 267 | #define _bfd_archive_coff_read_ar_hdr _bfd_generic_read_ar_hdr |
6812b607 ILT |
268 | #define _bfd_archive_coff_openr_next_archived_file \ |
269 | bfd_generic_openr_next_archived_file | |
64d5f5d0 | 270 | #define _bfd_archive_coff_get_elt_at_index _bfd_generic_get_elt_at_index |
6812b607 ILT |
271 | #define _bfd_archive_coff_generic_stat_arch_elt \ |
272 | bfd_generic_stat_arch_elt | |
0443af31 | 273 | #define _bfd_archive_coff_update_armap_timestamp bfd_true |
6812b607 ILT |
274 | |
275 | /* Routines to use for BFD_JUMP_TABLE_SYMBOLS where there is no symbol | |
276 | support. Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols). */ | |
277 | ||
278 | #define _bfd_nosymbols_get_symtab_upper_bound _bfd_n1 | |
279 | #define _bfd_nosymbols_get_symtab \ | |
280 | ((long (*) PARAMS ((bfd *, asymbol **))) _bfd_n1) | |
281 | #define _bfd_nosymbols_make_empty_symbol \ | |
282 | ((asymbol *(*) PARAMS ((bfd *))) bfd_nullvoidptr) | |
283 | #define _bfd_nosymbols_print_symbol \ | |
284 | ((void (*) PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type))) bfd_void) | |
285 | #define _bfd_nosymbols_get_symbol_info \ | |
286 | ((void (*) PARAMS ((bfd *, asymbol *, symbol_info *))) bfd_void) | |
35a3e78e ILT |
287 | #define _bfd_nosymbols_bfd_is_local_label_name \ |
288 | ((boolean (*) PARAMS ((bfd *, const char *))) bfd_false) | |
6812b607 ILT |
289 | #define _bfd_nosymbols_get_lineno \ |
290 | ((alent *(*) PARAMS ((bfd *, asymbol *))) bfd_nullvoidptr) | |
291 | #define _bfd_nosymbols_find_nearest_line \ | |
292 | ((boolean (*) \ | |
293 | PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **, \ | |
294 | const char **, unsigned int *))) \ | |
295 | bfd_false) | |
296 | #define _bfd_nosymbols_bfd_make_debug_symbol \ | |
297 | ((asymbol *(*) PARAMS ((bfd *, PTR, unsigned long))) bfd_nullvoidptr) | |
4e98461f SC |
298 | #define _bfd_nosymbols_read_minisymbols \ |
299 | ((long (*) PARAMS ((bfd *, boolean, PTR *, unsigned int *))) _bfd_n1) | |
300 | #define _bfd_nosymbols_minisymbol_to_symbol \ | |
301 | ((asymbol *(*) PARAMS ((bfd *, boolean, const PTR, asymbol *))) \ | |
302 | bfd_nullvoidptr) | |
6812b607 ILT |
303 | |
304 | /* Routines to use for BFD_JUMP_TABLE_RELOCS when there is no reloc | |
305 | support. Use BFD_JUMP_TABLE_RELOCS (_bfd_norelocs). */ | |
306 | ||
307 | #define _bfd_norelocs_get_reloc_upper_bound \ | |
308 | ((long (*) PARAMS ((bfd *, asection *))) _bfd_n1) | |
309 | #define _bfd_norelocs_canonicalize_reloc \ | |
310 | ((long (*) PARAMS ((bfd *, asection *, arelent **, asymbol **))) _bfd_n1) | |
311 | #define _bfd_norelocs_bfd_reloc_type_lookup \ | |
82b1edf7 | 312 | ((reloc_howto_type *(*) PARAMS ((bfd *, bfd_reloc_code_real_type))) \ |
6812b607 ILT |
313 | bfd_nullvoidptr) |
314 | ||
315 | /* Routines to use for BFD_JUMP_TABLE_WRITE for targets which may not | |
316 | be written. Use BFD_JUMP_TABLE_WRITE (_bfd_nowrite). */ | |
317 | ||
318 | #define _bfd_nowrite_set_arch_mach \ | |
319 | ((boolean (*) PARAMS ((bfd *, enum bfd_architecture, unsigned long))) \ | |
320 | bfd_false) | |
321 | #define _bfd_nowrite_set_section_contents \ | |
322 | ((boolean (*) PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type))) \ | |
323 | bfd_false) | |
324 | ||
325 | /* Generic routines to use for BFD_JUMP_TABLE_WRITE. Use | |
326 | BFD_JUMP_TABLE_WRITE (_bfd_generic). */ | |
327 | ||
328 | #define _bfd_generic_set_arch_mach bfd_default_set_arch_mach | |
329 | extern boolean _bfd_generic_set_section_contents | |
330 | PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type)); | |
331 | ||
332 | /* Routines to use for BFD_JUMP_TABLE_LINK for targets which do not | |
333 | support linking. Use BFD_JUMP_TABLE_LINK (_bfd_nolink). */ | |
334 | ||
335 | #define _bfd_nolink_sizeof_headers ((int (*) PARAMS ((bfd *, boolean))) bfd_0) | |
336 | #define _bfd_nolink_bfd_get_relocated_section_contents \ | |
337 | ((bfd_byte *(*) \ | |
338 | PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, \ | |
339 | bfd_byte *, boolean, asymbol **))) \ | |
340 | bfd_nullvoidptr) | |
341 | #define _bfd_nolink_bfd_relax_section \ | |
342 | ((boolean (*) \ | |
343 | PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *))) \ | |
344 | bfd_false) | |
345 | #define _bfd_nolink_bfd_link_hash_table_create \ | |
346 | ((struct bfd_link_hash_table *(*) PARAMS ((bfd *))) bfd_nullvoidptr) | |
347 | #define _bfd_nolink_bfd_link_add_symbols \ | |
348 | ((boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false) | |
349 | #define _bfd_nolink_bfd_final_link \ | |
350 | ((boolean (*) PARAMS ((bfd *, struct bfd_link_info *))) bfd_false) | |
4e98461f SC |
351 | #define _bfd_nolink_bfd_link_split_section \ |
352 | ((boolean (*) PARAMS ((bfd *, struct sec *))) bfd_false) | |
4ee3b9be JL |
353 | |
354 | /* Routines to use for BFD_JUMP_TABLE_DYNAMIC for targets which do not | |
355 | have dynamic symbols or relocs. Use BFD_JUMP_TABLE_DYNAMIC | |
356 | (_bfd_nodynamic). */ | |
357 | ||
358 | #define _bfd_nodynamic_get_dynamic_symtab_upper_bound _bfd_n1 | |
359 | #define _bfd_nodynamic_canonicalize_dynamic_symtab \ | |
360 | ((long (*) PARAMS ((bfd *, asymbol **))) _bfd_n1) | |
361 | #define _bfd_nodynamic_get_dynamic_reloc_upper_bound _bfd_n1 | |
362 | #define _bfd_nodynamic_canonicalize_dynamic_reloc \ | |
363 | ((long (*) PARAMS ((bfd *, arelent **, asymbol **))) _bfd_n1) | |
4c3721d5 | 364 | \f |
f1cca647 ILT |
365 | /* Generic routine to determine of the given symbol is a local |
366 | label. */ | |
35a3e78e | 367 | extern boolean bfd_generic_is_local_label_name PARAMS ((bfd *, const char *)); |
f1cca647 | 368 | |
4e98461f SC |
369 | /* Generic minisymbol routines. */ |
370 | extern long _bfd_generic_read_minisymbols | |
371 | PARAMS ((bfd *, boolean, PTR *, unsigned int *)); | |
372 | extern asymbol *_bfd_generic_minisymbol_to_symbol | |
373 | PARAMS ((bfd *, boolean, const PTR, asymbol *)); | |
374 | ||
e9f03cd4 ILT |
375 | /* Find the nearest line using .stab/.stabstr sections. */ |
376 | extern boolean _bfd_stab_section_find_nearest_line | |
377 | PARAMS ((bfd *, asymbol **, asection *, bfd_vma, boolean *, const char **, | |
378 | const char **, unsigned int *, PTR *)); | |
379 | ||
77e4176e ILT |
380 | /* Find the nearest line using DWARF 2 debugging information. */ |
381 | extern boolean _bfd_dwarf2_find_nearest_line | |
382 | PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **, | |
383 | const char **, unsigned int *)); | |
384 | ||
4c3721d5 ILT |
385 | /* A routine to create entries for a bfd_link_hash_table. */ |
386 | extern struct bfd_hash_entry *_bfd_link_hash_newfunc | |
387 | PARAMS ((struct bfd_hash_entry *entry, | |
388 | struct bfd_hash_table *table, | |
389 | const char *string)); | |
390 | ||
391 | /* Initialize a bfd_link_hash_table. */ | |
392 | extern boolean _bfd_link_hash_table_init | |
393 | PARAMS ((struct bfd_link_hash_table *, bfd *, | |
394 | struct bfd_hash_entry *(*) (struct bfd_hash_entry *, | |
395 | struct bfd_hash_table *, | |
396 | const char *))); | |
397 | ||
398 | /* Generic link hash table creation routine. */ | |
399 | extern struct bfd_link_hash_table *_bfd_generic_link_hash_table_create | |
400 | PARAMS ((bfd *)); | |
401 | ||
402 | /* Generic add symbol routine. */ | |
403 | extern boolean _bfd_generic_link_add_symbols | |
404 | PARAMS ((bfd *, struct bfd_link_info *)); | |
405 | ||
4335ce64 ILT |
406 | /* Generic add symbol routine. This version is used by targets for |
407 | which the linker must collect constructors and destructors by name, | |
408 | as the collect2 program does. */ | |
409 | extern boolean _bfd_generic_link_add_symbols_collect | |
410 | PARAMS ((bfd *, struct bfd_link_info *)); | |
411 | ||
4c3721d5 ILT |
412 | /* Generic archive add symbol routine. */ |
413 | extern boolean _bfd_generic_link_add_archive_symbols | |
414 | PARAMS ((bfd *, struct bfd_link_info *, | |
415 | boolean (*checkfn) (bfd *, struct bfd_link_info *, boolean *))); | |
416 | ||
39f27966 JL |
417 | |
418 | ||
4c3721d5 ILT |
419 | /* Forward declaration to avoid prototype errors. */ |
420 | typedef struct bfd_link_hash_entry _bfd_link_hash_entry; | |
421 | ||
422 | /* Generic routine to add a single symbol. */ | |
423 | extern boolean _bfd_generic_link_add_one_symbol | |
424 | PARAMS ((struct bfd_link_info *, bfd *, const char *name, flagword, | |
425 | asection *, bfd_vma, const char *, boolean copy, | |
f1cca647 | 426 | boolean constructor, struct bfd_link_hash_entry **)); |
4c3721d5 ILT |
427 | |
428 | /* Generic link routine. */ | |
429 | extern boolean _bfd_generic_final_link | |
430 | PARAMS ((bfd *, struct bfd_link_info *)); | |
431 | ||
4e98461f SC |
432 | extern boolean _bfd_generic_link_split_section |
433 | PARAMS ((bfd *, struct sec *)); | |
434 | ||
f1cca647 ILT |
435 | /* Generic reloc_link_order processing routine. */ |
436 | extern boolean _bfd_generic_reloc_link_order | |
437 | PARAMS ((bfd *, struct bfd_link_info *, asection *, | |
438 | struct bfd_link_order *)); | |
439 | ||
4c3721d5 ILT |
440 | /* Default link order processing routine. */ |
441 | extern boolean _bfd_default_link_order | |
442 | PARAMS ((bfd *, struct bfd_link_info *, asection *, | |
443 | struct bfd_link_order *)); | |
444 | ||
f1cca647 ILT |
445 | /* Count the number of reloc entries in a link order list. */ |
446 | extern unsigned int _bfd_count_link_order_relocs | |
447 | PARAMS ((struct bfd_link_order *)); | |
448 | ||
4c3721d5 ILT |
449 | /* Final link relocation routine. */ |
450 | extern bfd_reloc_status_type _bfd_final_link_relocate | |
82b1edf7 | 451 | PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *, |
4c3721d5 ILT |
452 | bfd_vma address, bfd_vma value, bfd_vma addend)); |
453 | ||
454 | /* Relocate a particular location by a howto and a value. */ | |
455 | extern bfd_reloc_status_type _bfd_relocate_contents | |
82b1edf7 | 456 | PARAMS ((reloc_howto_type *, bfd *, bfd_vma, bfd_byte *)); |
e914ed52 | 457 | |
50bd50d4 MH |
458 | /* Link stabs in sections in the first pass. */ |
459 | ||
460 | extern boolean _bfd_link_section_stabs | |
461 | PARAMS ((bfd *, PTR *, asection *, asection *, PTR *)); | |
462 | ||
463 | /* Write out the .stab section when linking stabs in sections. */ | |
464 | ||
465 | extern boolean _bfd_write_section_stabs | |
3cd5cf3d | 466 | PARAMS ((bfd *, PTR *, asection *, PTR *, bfd_byte *)); |
50bd50d4 MH |
467 | |
468 | /* Write out the .stabstr string table when linking stabs in sections. */ | |
469 | ||
470 | extern boolean _bfd_write_stab_strings PARAMS ((bfd *, PTR *)); | |
471 | ||
48e509bf NC |
472 | /* Find an offset within a .stab section when linking stabs in |
473 | sections. */ | |
474 | ||
475 | extern bfd_vma _bfd_stab_section_offset | |
476 | PARAMS ((bfd *, PTR *, asection *, PTR *, bfd_vma)); | |
477 | ||
e914ed52 ILT |
478 | /* Create a string table. */ |
479 | extern struct bfd_strtab_hash *_bfd_stringtab_init PARAMS ((void)); | |
480 | ||
64d5f5d0 ILT |
481 | /* Create an XCOFF .debug section style string table. */ |
482 | extern struct bfd_strtab_hash *_bfd_xcoff_stringtab_init PARAMS ((void)); | |
483 | ||
e914ed52 ILT |
484 | /* Free a string table. */ |
485 | extern void _bfd_stringtab_free PARAMS ((struct bfd_strtab_hash *)); | |
486 | ||
487 | /* Get the size of a string table. */ | |
488 | extern bfd_size_type _bfd_stringtab_size PARAMS ((struct bfd_strtab_hash *)); | |
489 | ||
490 | /* Add a string to a string table. */ | |
491 | extern bfd_size_type _bfd_stringtab_add | |
492 | PARAMS ((struct bfd_strtab_hash *, const char *, boolean hash, | |
493 | boolean copy)); | |
494 | ||
495 | /* Write out a string table. */ | |
496 | extern boolean _bfd_stringtab_emit PARAMS ((bfd *, struct bfd_strtab_hash *)); | |
4c3721d5 | 497 | \f |
4a81b561 DHW |
498 | /* Macros to tell if bfds are read or write enabled. |
499 | ||
500 | Note that bfds open for read may be scribbled into if the fd passed | |
501 | to bfd_fdopenr is actually open both for read and write | |
502 | simultaneously. However an output bfd will never be open for | |
503 | read. Therefore sometimes you want to check bfd_read_p or | |
504 | !bfd_read_p, and only sometimes bfd_write_p. | |
505 | */ | |
506 | ||
287c221d PB |
507 | #define bfd_read_p(abfd) ((abfd)->direction == read_direction || (abfd)->direction == both_direction) |
508 | #define bfd_write_p(abfd) ((abfd)->direction == write_direction || (abfd)->direction == both_direction) | |
509 | ||
c53fac12 | 510 | void bfd_assert PARAMS ((const char*,int)); |
4a81b561 | 511 | |
4a81b561 DHW |
512 | #define BFD_ASSERT(x) \ |
513 | { if (!(x)) bfd_assert(__FILE__,__LINE__); } | |
514 | ||
515 | #define BFD_FAIL() \ | |
516 | { bfd_assert(__FILE__,__LINE__); } | |
517 | ||
287c221d | 518 | FILE * bfd_cache_lookup_worker PARAMS ((bfd *)); |
4a81b561 DHW |
519 | |
520 | extern bfd *bfd_last_cache; | |
69ebee86 | 521 | |
4c3721d5 | 522 | /* List of supported target vectors, and the default vector (if |
f4bd7a8f | 523 | bfd_default_vector[0] is NULL, there is no default). */ |
e914ed52 | 524 | extern const bfd_target * const bfd_target_vector[]; |
50ede03d | 525 | extern const bfd_target *bfd_default_vector[]; |
4c3721d5 | 526 | |
02f85cda | 527 | /* Functions shared by the ECOFF and MIPS ELF backends, which have no |
4e98461f SC |
528 | other common header files. */ |
529 | ||
530 | #if defined(__STDC__) || defined(ALMOST_STDC) | |
531 | struct ecoff_find_line; | |
532 | #endif | |
533 | ||
02f85cda | 534 | extern boolean _bfd_ecoff_locate_line |
4e98461f SC |
535 | PARAMS ((bfd *, asection *, bfd_vma, struct ecoff_debug_info * const, |
536 | const struct ecoff_debug_swap * const, struct ecoff_find_line *, | |
537 | const char **, const char **, unsigned int *)); | |
02f85cda MM |
538 | extern boolean _bfd_ecoff_get_accumulated_pdr PARAMS ((PTR, bfd_byte *)); |
539 | extern boolean _bfd_ecoff_get_accumulated_sym PARAMS ((PTR, bfd_byte *)); | |
540 | extern boolean _bfd_ecoff_get_accumulated_ss PARAMS ((PTR, bfd_byte *)); | |
4e98461f | 541 | |
39f27966 JL |
542 | extern bfd_vma _bfd_get_gp_value PARAMS ((bfd *)); |
543 | extern void _bfd_set_gp_value PARAMS ((bfd *, bfd_vma)); | |
544 | ||
c86158e5 ILT |
545 | /* Function shared by the COFF and ELF SH backends, which have no |
546 | other common header files. */ | |
547 | ||
548 | extern boolean _bfd_sh_align_load_span | |
549 | PARAMS ((bfd *, asection *, bfd_byte *, | |
550 | boolean (*) (bfd *, asection *, PTR, bfd_byte *, bfd_vma), | |
551 | PTR, bfd_vma **, bfd_vma *, bfd_vma, bfd_vma, boolean *)); | |
552 | ||
b8d69097 | 553 | /* And more follows */ |
6f715d66 | 554 | |
fefb4b30 JG |
555 | void |
556 | bfd_write_bigendian_4byte_int PARAMS ((bfd *abfd, int i)); | |
557 | ||
3ceaa255 | 558 | unsigned int |
fefb4b30 JG |
559 | bfd_log2 PARAMS ((bfd_vma x)); |
560 | ||
6f715d66 | 561 | #define BFD_CACHE_MAX_OPEN 10 |
6f715d66 | 562 | extern bfd *bfd_last_cache; |
e98e6ec1 | 563 | |
6f715d66 | 564 | #define bfd_cache_lookup(x) \ |
0cda46cf SC |
565 | ((x)==bfd_last_cache? \ |
566 | (FILE*)(bfd_last_cache->iostream): \ | |
567 | bfd_cache_lookup_worker(x)) | |
4ee3b9be JL |
568 | boolean |
569 | bfd_cache_init PARAMS ((bfd *abfd)); | |
570 | ||
fefb4b30 | 571 | boolean |
c188b0be | 572 | bfd_cache_close PARAMS ((bfd *abfd)); |
fefb4b30 JG |
573 | |
574 | FILE* | |
c188b0be | 575 | bfd_open_file PARAMS ((bfd *abfd)); |
fefb4b30 JG |
576 | |
577 | FILE * | |
c188b0be | 578 | bfd_cache_lookup_worker PARAMS ((bfd *abfd)); |
fefb4b30 | 579 | |
0443af31 KR |
580 | #ifdef _BFD_MAKE_TABLE_bfd_reloc_code_real |
581 | ||
582 | static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", | |
583 | ||
584 | "BFD_RELOC_64", | |
585 | "BFD_RELOC_32", | |
586 | "BFD_RELOC_26", | |
c7f8d0a5 | 587 | "BFD_RELOC_24", |
0443af31 KR |
588 | "BFD_RELOC_16", |
589 | "BFD_RELOC_14", | |
590 | "BFD_RELOC_8", | |
591 | "BFD_RELOC_64_PCREL", | |
592 | "BFD_RELOC_32_PCREL", | |
593 | "BFD_RELOC_24_PCREL", | |
594 | "BFD_RELOC_16_PCREL", | |
fca2b81b | 595 | "BFD_RELOC_12_PCREL", |
0443af31 | 596 | "BFD_RELOC_8_PCREL", |
4e98461f SC |
597 | "BFD_RELOC_32_GOT_PCREL", |
598 | "BFD_RELOC_16_GOT_PCREL", | |
599 | "BFD_RELOC_8_GOT_PCREL", | |
600 | "BFD_RELOC_32_GOTOFF", | |
601 | "BFD_RELOC_16_GOTOFF", | |
02f85cda MM |
602 | "BFD_RELOC_LO16_GOTOFF", |
603 | "BFD_RELOC_HI16_GOTOFF", | |
604 | "BFD_RELOC_HI16_S_GOTOFF", | |
4e98461f SC |
605 | "BFD_RELOC_8_GOTOFF", |
606 | "BFD_RELOC_32_PLT_PCREL", | |
02f85cda | 607 | "BFD_RELOC_24_PLT_PCREL", |
4e98461f SC |
608 | "BFD_RELOC_16_PLT_PCREL", |
609 | "BFD_RELOC_8_PLT_PCREL", | |
610 | "BFD_RELOC_32_PLTOFF", | |
611 | "BFD_RELOC_16_PLTOFF", | |
02f85cda MM |
612 | "BFD_RELOC_LO16_PLTOFF", |
613 | "BFD_RELOC_HI16_PLTOFF", | |
614 | "BFD_RELOC_HI16_S_PLTOFF", | |
4e98461f SC |
615 | "BFD_RELOC_8_PLTOFF", |
616 | "BFD_RELOC_68K_GLOB_DAT", | |
617 | "BFD_RELOC_68K_JMP_SLOT", | |
618 | "BFD_RELOC_68K_RELATIVE", | |
0443af31 KR |
619 | "BFD_RELOC_32_BASEREL", |
620 | "BFD_RELOC_16_BASEREL", | |
02f85cda MM |
621 | "BFD_RELOC_LO16_BASEREL", |
622 | "BFD_RELOC_HI16_BASEREL", | |
623 | "BFD_RELOC_HI16_S_BASEREL", | |
0443af31 | 624 | "BFD_RELOC_8_BASEREL", |
4e98461f | 625 | "BFD_RELOC_RVA", |
0443af31 KR |
626 | "BFD_RELOC_8_FFnn", |
627 | "BFD_RELOC_32_PCREL_S2", | |
628 | "BFD_RELOC_16_PCREL_S2", | |
629 | "BFD_RELOC_23_PCREL_S2", | |
630 | "BFD_RELOC_HI22", | |
631 | "BFD_RELOC_LO10", | |
632 | "BFD_RELOC_GPREL16", | |
633 | "BFD_RELOC_GPREL32", | |
634 | "BFD_RELOC_I960_CALLJ", | |
635 | "BFD_RELOC_NONE", | |
636 | "BFD_RELOC_SPARC_WDISP22", | |
637 | "BFD_RELOC_SPARC22", | |
638 | "BFD_RELOC_SPARC13", | |
639 | "BFD_RELOC_SPARC_GOT10", | |
640 | "BFD_RELOC_SPARC_GOT13", | |
641 | "BFD_RELOC_SPARC_GOT22", | |
642 | "BFD_RELOC_SPARC_PC10", | |
643 | "BFD_RELOC_SPARC_PC22", | |
644 | "BFD_RELOC_SPARC_WPLT30", | |
645 | "BFD_RELOC_SPARC_COPY", | |
646 | "BFD_RELOC_SPARC_GLOB_DAT", | |
647 | "BFD_RELOC_SPARC_JMP_SLOT", | |
648 | "BFD_RELOC_SPARC_RELATIVE", | |
649 | "BFD_RELOC_SPARC_UA32", | |
650 | "BFD_RELOC_SPARC_BASE13", | |
651 | "BFD_RELOC_SPARC_BASE22", | |
652 | "BFD_RELOC_SPARC_10", | |
653 | "BFD_RELOC_SPARC_11", | |
654 | "BFD_RELOC_SPARC_OLO10", | |
655 | "BFD_RELOC_SPARC_HH22", | |
656 | "BFD_RELOC_SPARC_HM10", | |
657 | "BFD_RELOC_SPARC_LM22", | |
658 | "BFD_RELOC_SPARC_PC_HH22", | |
659 | "BFD_RELOC_SPARC_PC_HM10", | |
660 | "BFD_RELOC_SPARC_PC_LM22", | |
661 | "BFD_RELOC_SPARC_WDISP16", | |
662 | "BFD_RELOC_SPARC_WDISP19", | |
e9f03cd4 ILT |
663 | "BFD_RELOC_SPARC_7", |
664 | "BFD_RELOC_SPARC_6", | |
665 | "BFD_RELOC_SPARC_5", | |
77e4176e ILT |
666 | "BFD_RELOC_SPARC_PLT64", |
667 | "BFD_RELOC_SPARC_HIX22", | |
668 | "BFD_RELOC_SPARC_LOX10", | |
669 | "BFD_RELOC_SPARC_H44", | |
670 | "BFD_RELOC_SPARC_M44", | |
671 | "BFD_RELOC_SPARC_L44", | |
672 | "BFD_RELOC_SPARC_REGISTER", | |
0443af31 KR |
673 | "BFD_RELOC_ALPHA_GPDISP_HI16", |
674 | "BFD_RELOC_ALPHA_GPDISP_LO16", | |
50bd50d4 | 675 | "BFD_RELOC_ALPHA_GPDISP", |
0443af31 | 676 | "BFD_RELOC_ALPHA_LITERAL", |
6b31fd3a | 677 | "BFD_RELOC_ALPHA_ELF_LITERAL", |
0443af31 KR |
678 | "BFD_RELOC_ALPHA_LITUSE", |
679 | "BFD_RELOC_ALPHA_HINT", | |
50bd50d4 | 680 | "BFD_RELOC_ALPHA_LINKAGE", |
fd8d7c31 | 681 | "BFD_RELOC_ALPHA_CODEADDR", |
0443af31 | 682 | "BFD_RELOC_MIPS_JMP", |
c7f8d0a5 | 683 | "BFD_RELOC_MIPS16_JMP", |
a4183ba5 | 684 | "BFD_RELOC_MIPS16_GPREL", |
0443af31 KR |
685 | "BFD_RELOC_HI16", |
686 | "BFD_RELOC_HI16_S", | |
687 | "BFD_RELOC_LO16", | |
688 | "BFD_RELOC_PCREL_HI16_S", | |
689 | "BFD_RELOC_PCREL_LO16", | |
690 | "BFD_RELOC_MIPS_LITERAL", | |
691 | "BFD_RELOC_MIPS_GOT16", | |
692 | "BFD_RELOC_MIPS_CALL16", | |
e9f03cd4 ILT |
693 | "BFD_RELOC_MIPS_GOT_HI16", |
694 | "BFD_RELOC_MIPS_GOT_LO16", | |
b7384d22 ILT |
695 | "BFD_RELOC_MIPS_CALL_HI16", |
696 | "BFD_RELOC_MIPS_CALL_LO16", | |
53d3ce37 TT |
697 | /* start-sanitize-r5900 */ |
698 | "BFD_RELOC_MIPS15_S3", | |
699 | /* end-sanitize-r5900 */ | |
36df40e0 DE |
700 | /* start-sanitize-sky */ |
701 | "BFD_RELOC_MIPS_DVP_11_PCREL", | |
53d3ce37 | 702 | "BFD_RELOC_MIPS_DVP_27_S4", |
36df40e0 DE |
703 | /* end-sanitize-sky */ |
704 | ||
0443af31 KR |
705 | "BFD_RELOC_386_GOT32", |
706 | "BFD_RELOC_386_PLT32", | |
707 | "BFD_RELOC_386_COPY", | |
708 | "BFD_RELOC_386_GLOB_DAT", | |
709 | "BFD_RELOC_386_JUMP_SLOT", | |
710 | "BFD_RELOC_386_RELATIVE", | |
711 | "BFD_RELOC_386_GOTOFF", | |
712 | "BFD_RELOC_386_GOTPC", | |
713 | "BFD_RELOC_NS32K_IMM_8", | |
714 | "BFD_RELOC_NS32K_IMM_16", | |
715 | "BFD_RELOC_NS32K_IMM_32", | |
716 | "BFD_RELOC_NS32K_IMM_8_PCREL", | |
717 | "BFD_RELOC_NS32K_IMM_16_PCREL", | |
718 | "BFD_RELOC_NS32K_IMM_32_PCREL", | |
719 | "BFD_RELOC_NS32K_DISP_8", | |
720 | "BFD_RELOC_NS32K_DISP_16", | |
721 | "BFD_RELOC_NS32K_DISP_32", | |
722 | "BFD_RELOC_NS32K_DISP_8_PCREL", | |
723 | "BFD_RELOC_NS32K_DISP_16_PCREL", | |
724 | "BFD_RELOC_NS32K_DISP_32_PCREL", | |
725 | "BFD_RELOC_PPC_B26", | |
726 | "BFD_RELOC_PPC_BA26", | |
727 | "BFD_RELOC_PPC_TOC16", | |
02f85cda MM |
728 | "BFD_RELOC_PPC_B16", |
729 | "BFD_RELOC_PPC_B16_BRTAKEN", | |
730 | "BFD_RELOC_PPC_B16_BRNTAKEN", | |
731 | "BFD_RELOC_PPC_BA16", | |
732 | "BFD_RELOC_PPC_BA16_BRTAKEN", | |
733 | "BFD_RELOC_PPC_BA16_BRNTAKEN", | |
734 | "BFD_RELOC_PPC_COPY", | |
735 | "BFD_RELOC_PPC_GLOB_DAT", | |
736 | "BFD_RELOC_PPC_JMP_SLOT", | |
737 | "BFD_RELOC_PPC_RELATIVE", | |
738 | "BFD_RELOC_PPC_LOCAL24PC", | |
e9f03cd4 ILT |
739 | "BFD_RELOC_PPC_EMB_NADDR32", |
740 | "BFD_RELOC_PPC_EMB_NADDR16", | |
741 | "BFD_RELOC_PPC_EMB_NADDR16_LO", | |
742 | "BFD_RELOC_PPC_EMB_NADDR16_HI", | |
743 | "BFD_RELOC_PPC_EMB_NADDR16_HA", | |
744 | "BFD_RELOC_PPC_EMB_SDAI16", | |
745 | "BFD_RELOC_PPC_EMB_SDA2I16", | |
746 | "BFD_RELOC_PPC_EMB_SDA2REL", | |
747 | "BFD_RELOC_PPC_EMB_SDA21", | |
748 | "BFD_RELOC_PPC_EMB_MRKREF", | |
749 | "BFD_RELOC_PPC_EMB_RELSEC16", | |
750 | "BFD_RELOC_PPC_EMB_RELST_LO", | |
751 | "BFD_RELOC_PPC_EMB_RELST_HI", | |
752 | "BFD_RELOC_PPC_EMB_RELST_HA", | |
753 | "BFD_RELOC_PPC_EMB_BIT_FLD", | |
754 | "BFD_RELOC_PPC_EMB_RELSDA", | |
0443af31 | 755 | "BFD_RELOC_CTOR", |
fca2b81b KR |
756 | "BFD_RELOC_ARM_PCREL_BRANCH", |
757 | "BFD_RELOC_ARM_IMMEDIATE", | |
758 | "BFD_RELOC_ARM_OFFSET_IMM", | |
759 | "BFD_RELOC_ARM_SHIFT_IMM", | |
760 | "BFD_RELOC_ARM_SWI", | |
761 | "BFD_RELOC_ARM_MULTI", | |
762 | "BFD_RELOC_ARM_CP_OFF_IMM", | |
4e98461f SC |
763 | "BFD_RELOC_ARM_ADR_IMM", |
764 | "BFD_RELOC_ARM_LDR_IMM", | |
765 | "BFD_RELOC_ARM_LITERAL", | |
766 | "BFD_RELOC_ARM_IN_POOL", | |
d1b40d8e JSC |
767 | "BFD_RELOC_ARM_OFFSET_IMM8", |
768 | "BFD_RELOC_ARM_HWLITERAL", | |
c86158e5 ILT |
769 | "BFD_RELOC_ARM_THUMB_ADD", |
770 | "BFD_RELOC_ARM_THUMB_IMM", | |
771 | "BFD_RELOC_ARM_THUMB_SHIFT", | |
772 | "BFD_RELOC_ARM_THUMB_OFFSET", | |
773 | "BFD_RELOC_SH_PCDISP8BY2", | |
774 | "BFD_RELOC_SH_PCDISP12BY2", | |
775 | "BFD_RELOC_SH_IMM4", | |
776 | "BFD_RELOC_SH_IMM4BY2", | |
777 | "BFD_RELOC_SH_IMM4BY4", | |
778 | "BFD_RELOC_SH_IMM8", | |
779 | "BFD_RELOC_SH_IMM8BY2", | |
780 | "BFD_RELOC_SH_IMM8BY4", | |
781 | "BFD_RELOC_SH_PCRELIMM8BY2", | |
782 | "BFD_RELOC_SH_PCRELIMM8BY4", | |
783 | "BFD_RELOC_SH_SWITCH16", | |
784 | "BFD_RELOC_SH_SWITCH32", | |
785 | "BFD_RELOC_SH_USES", | |
786 | "BFD_RELOC_SH_COUNT", | |
787 | "BFD_RELOC_SH_ALIGN", | |
788 | "BFD_RELOC_SH_CODE", | |
789 | "BFD_RELOC_SH_DATA", | |
790 | "BFD_RELOC_SH_LABEL", | |
48e509bf NC |
791 | "BFD_RELOC_THUMB_PCREL_BRANCH9", |
792 | "BFD_RELOC_THUMB_PCREL_BRANCH12", | |
793 | "BFD_RELOC_THUMB_PCREL_BRANCH23", | |
76af94b9 DE |
794 | "BFD_RELOC_ARC_B22_PCREL", |
795 | "BFD_RELOC_ARC_B26", | |
50bd50d4 | 796 | "BFD_RELOC_D10V_10_PCREL_R", |
0f612729 | 797 | "BFD_RELOC_D10V_10_PCREL_L", |
50bd50d4 MH |
798 | "BFD_RELOC_D10V_18", |
799 | "BFD_RELOC_D10V_18_PCREL", | |
50bd50d4 | 800 | |
fd8d7c31 MH |
801 | /* start-sanitize-d30v */ |
802 | "BFD_RELOC_D30V_6", | |
2199f848 KR |
803 | "BFD_RELOC_D30V_9_PCREL", |
804 | "BFD_RELOC_D30V_9_PCREL_R", | |
fd8d7c31 MH |
805 | "BFD_RELOC_D30V_15", |
806 | "BFD_RELOC_D30V_15_PCREL", | |
2199f848 | 807 | "BFD_RELOC_D30V_15_PCREL_R", |
fd8d7c31 MH |
808 | "BFD_RELOC_D30V_21", |
809 | "BFD_RELOC_D30V_21_PCREL", | |
2199f848 | 810 | "BFD_RELOC_D30V_21_PCREL_R", |
fd8d7c31 MH |
811 | "BFD_RELOC_D30V_32", |
812 | "BFD_RELOC_D30V_32_PCREL", | |
813 | /* end-sanitize-d30v */ | |
814 | ||
c7f8d0a5 ILT |
815 | "BFD_RELOC_M32R_24", |
816 | "BFD_RELOC_M32R_10_PCREL", | |
817 | "BFD_RELOC_M32R_18_PCREL", | |
818 | "BFD_RELOC_M32R_26_PCREL", | |
1d5c6cfd DE |
819 | "BFD_RELOC_M32R_HI16_ULO", |
820 | "BFD_RELOC_M32R_HI16_SLO", | |
821 | "BFD_RELOC_M32R_LO16", | |
35a3e78e | 822 | "BFD_RELOC_M32R_SDA16", |
6b31fd3a ILT |
823 | "BFD_RELOC_V850_9_PCREL", |
824 | "BFD_RELOC_V850_22_PCREL", | |
def31039 NC |
825 | "BFD_RELOC_V850_SDA_16_16_OFFSET", |
826 | "BFD_RELOC_V850_SDA_15_16_OFFSET", | |
827 | "BFD_RELOC_V850_ZDA_16_16_OFFSET", | |
828 | "BFD_RELOC_V850_ZDA_15_16_OFFSET", | |
829 | "BFD_RELOC_V850_TDA_6_8_OFFSET", | |
830 | "BFD_RELOC_V850_TDA_7_8_OFFSET", | |
831 | "BFD_RELOC_V850_TDA_7_7_OFFSET", | |
5bb28764 | 832 | "BFD_RELOC_V850_TDA_16_16_OFFSET", |
def31039 NC |
833 | /* start-sanitize-v850e */ |
834 | "BFD_RELOC_V850_TDA_4_5_OFFSET", | |
835 | "BFD_RELOC_V850_TDA_4_4_OFFSET", | |
836 | "BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET", | |
837 | "BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET", | |
3869b11f DE |
838 | "BFD_RELOC_V850_CALLT_6_7_OFFSET", |
839 | "BFD_RELOC_V850_CALLT_16_16_OFFSET", | |
2cf9a0d0 | 840 | /* end-sanitize-v850e */ |
6b31fd3a | 841 | |
c7f8d0a5 ILT |
842 | "BFD_RELOC_MN10300_32_PCREL", |
843 | "BFD_RELOC_MN10300_16_PCREL", | |
29b7118a | 844 | "BFD_RELOC_TIC30_LDP", |
0443af31 KR |
845 | "@@overflow: BFD_RELOC_UNUSED@@", |
846 | }; | |
847 | #endif | |
848 | ||
4e98461f | 849 | reloc_howto_type * |
fefb4b30 | 850 | bfd_default_reloc_type_lookup |
57a1867e | 851 | PARAMS ((bfd *abfd, bfd_reloc_code_real_type code)); |
fefb4b30 JG |
852 | |
853 | boolean | |
854 | bfd_generic_relax_section | |
855 | PARAMS ((bfd *abfd, | |
d58b7049 | 856 | asection *section, |
4c3721d5 | 857 | struct bfd_link_info *, |
326e32d7 | 858 | boolean *)); |
fefb4b30 | 859 | |
e98e6ec1 | 860 | bfd_byte * |
fefb4b30 | 861 | |
287c221d | 862 | bfd_generic_get_relocated_section_contents PARAMS ((bfd *abfd, |
4c3721d5 ILT |
863 | struct bfd_link_info *link_info, |
864 | struct bfd_link_order *link_order, | |
14e3c2e4 | 865 | bfd_byte *data, |
4c3721d5 ILT |
866 | boolean relocateable, |
867 | asymbol **symbols)); | |
14e3c2e4 | 868 | |
2ffbb79a | 869 | extern const bfd_arch_info_type bfd_default_arch_struct; |
fefb4b30 JG |
870 | boolean |
871 | bfd_default_set_arch_mach PARAMS ((bfd *abfd, | |
e98e6ec1 SC |
872 | enum bfd_architecture arch, |
873 | unsigned long mach)); | |
fefb4b30 | 874 | |
2ffbb79a | 875 | const bfd_arch_info_type * |
fefb4b30 | 876 | bfd_default_compatible |
2ffbb79a ILT |
877 | PARAMS ((const bfd_arch_info_type *a, |
878 | const bfd_arch_info_type *b)); | |
fefb4b30 JG |
879 | |
880 | boolean | |
2ffbb79a | 881 | bfd_default_scan PARAMS ((const struct bfd_arch_info *info, const char *string)); |
fefb4b30 | 882 | |
3ceaa255 | 883 | struct elf_internal_shdr * |
6affd66a | 884 | bfd_elf_find_section PARAMS ((bfd *abfd, char *name)); |
fefb4b30 | 885 |