Commit | Line | Data |
---|---|---|
3c8a3c56 | 1 | /* BFD COFF object file private structure. |
326e32d7 | 2 | Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. |
3c8a3c56 | 3 | Written by Cygnus Support. |
4a81b561 | 4 | |
3c8a3c56 | 5 | This file is part of BFD, the Binary File Descriptor library. |
4a81b561 | 6 | |
3c8a3c56 | 7 | This program is free software; you can redistribute it and/or modify |
4a81b561 | 8 | it under the terms of the GNU General Public License as published by |
3c8a3c56 JG |
9 | the Free Software Foundation; either version 2 of the License, or |
10 | (at your option) any later version. | |
4a81b561 | 11 | |
3c8a3c56 | 12 | This program is distributed in the hope that it will be useful, |
4a81b561 DHW |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
15 | GNU General Public License for more details. | |
16 | ||
17 | You should have received a copy of the GNU General Public License | |
3c8a3c56 JG |
18 | along with this program; if not, write to the Free Software |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | |
4a81b561 | 20 | |
69645d10 | 21 | #include "bfdlink.h" |
4a81b561 | 22 | |
4a81b561 DHW |
23 | /* Object file tdata; access macros */ |
24 | ||
2f8640fe | 25 | #define coff_data(bfd) ((bfd)->tdata.coff_obj_data) |
3b4f1a5d SC |
26 | #define exec_hdr(bfd) (coff_data(bfd)->hdr) |
27 | #define obj_symbols(bfd) (coff_data(bfd)->symbols) | |
28 | #define obj_sym_filepos(bfd) (coff_data(bfd)->sym_filepos) | |
3c8a3c56 | 29 | |
3b4f1a5d SC |
30 | #define obj_relocbase(bfd) (coff_data(bfd)->relocbase) |
31 | #define obj_raw_syments(bfd) (coff_data(bfd)->raw_syments) | |
85fe7cff | 32 | #define obj_raw_syment_count(bfd) (coff_data(bfd)->raw_syment_count) |
3b4f1a5d | 33 | #define obj_convert(bfd) (coff_data(bfd)->conversion_table) |
07de8e96 | 34 | #define obj_conv_table_size(bfd) (coff_data(bfd)->conv_table_size) |
0cda46cf | 35 | |
69645d10 ILT |
36 | #define obj_coff_external_syms(bfd) (coff_data (bfd)->external_syms) |
37 | #define obj_coff_strings(bfd) (coff_data (bfd)->strings) | |
38 | #define obj_coff_sym_hashes(bfd) (coff_data (bfd)->sym_hashes) | |
4a81b561 | 39 | |
3b4f1a5d | 40 | /* `Tdata' information kept for COFF files. */ |
3c8a3c56 | 41 | |
3b4f1a5d SC |
42 | typedef struct coff_tdata |
43 | { | |
44 | struct coff_symbol_struct *symbols; /* symtab for input bfd */ | |
4a81b561 | 45 | unsigned int *conversion_table; |
07de8e96 | 46 | int conv_table_size; |
4a81b561 DHW |
47 | file_ptr sym_filepos; |
48 | ||
3b4f1a5d | 49 | struct coff_ptr_struct *raw_syments; |
4a81b561 | 50 | unsigned int raw_syment_count; |
3b4f1a5d | 51 | |
4a81b561 DHW |
52 | /* These are only valid once writing has begun */ |
53 | long int relocbase; | |
3b4f1a5d SC |
54 | |
55 | /* These members communicate important constants about the symbol table | |
56 | to GDB's symbol-reading code. These `constants' unfortunately vary | |
57 | from coff implementation to implementation... */ | |
58 | unsigned local_n_btmask; | |
59 | unsigned local_n_btshft; | |
60 | unsigned local_n_tmask; | |
61 | unsigned local_n_tshift; | |
62 | unsigned local_symesz; | |
63 | unsigned local_auxesz; | |
64 | unsigned local_linesz; | |
69645d10 ILT |
65 | |
66 | /* Used by the COFF backend linker. */ | |
67 | PTR external_syms; | |
68 | char *strings; | |
69 | struct coff_link_hash_entry **sym_hashes; | |
9872a49c | 70 | } coff_data_type; |
4a81b561 | 71 | |
fc723380 | 72 | /* We take the address of the first element of a asymbol to ensure that the |
4a81b561 DHW |
73 | * macro is only ever applied to an asymbol. */ |
74 | #define coffsymbol(asymbol) ((coff_symbol_type *)(&((asymbol)->the_bfd))) | |
fc723380 | 75 | |
69645d10 ILT |
76 | /* COFF linker hash table entries. */ |
77 | ||
78 | struct coff_link_hash_entry | |
79 | { | |
80 | struct bfd_link_hash_entry root; | |
81 | ||
82 | /* Symbol index in output file. Set to -1 initially. Set to -2 if | |
83 | there is a reloc against this symbol. */ | |
84 | long indx; | |
85 | ||
86 | /* Symbol type. */ | |
87 | unsigned short type; | |
88 | ||
89 | /* Symbol class. */ | |
90 | unsigned char class; | |
91 | ||
92 | /* Number of auxiliary entries. */ | |
93 | char numaux; | |
94 | ||
95 | /* BFD to take auxiliary entries from. */ | |
96 | bfd *auxbfd; | |
97 | ||
98 | /* Pointer to array of auxiliary entries, if any. */ | |
99 | union internal_auxent *aux; | |
100 | }; | |
101 | ||
102 | /* COFF linker hash table. */ | |
103 | ||
104 | struct coff_link_hash_table | |
105 | { | |
106 | struct bfd_link_hash_table root; | |
107 | }; | |
108 | ||
109 | /* Look up an entry in a COFF linker hash table. */ | |
110 | ||
111 | #define coff_link_hash_lookup(table, string, create, copy, follow) \ | |
112 | ((struct coff_link_hash_entry *) \ | |
113 | bfd_link_hash_lookup (&(table)->root, (string), (create), \ | |
114 | (copy), (follow))) | |
115 | ||
116 | /* Traverse a COFF linker hash table. */ | |
117 | ||
118 | #define coff_link_hash_traverse(table, func, info) \ | |
119 | (bfd_link_hash_traverse \ | |
120 | (&(table)->root, \ | |
121 | (boolean (*) PARAMS ((struct bfd_link_hash_entry *, PTR))) (func), \ | |
122 | (info))) | |
123 | ||
124 | /* Get the COFF linker hash table from a link_info structure. */ | |
125 | ||
126 | #define coff_hash_table(p) ((struct coff_link_hash_table *) ((p)->hash)) | |
127 | ||
075caafd | 128 | /* Functions in coffgen.c. */ |
e8fbe6d9 | 129 | extern const bfd_target *coff_object_p PARAMS ((bfd *)); |
075caafd | 130 | extern struct sec *coff_section_from_bfd_index PARAMS ((bfd *, int)); |
326e32d7 ILT |
131 | extern long coff_get_symtab_upper_bound PARAMS ((bfd *)); |
132 | extern long coff_get_symtab PARAMS ((bfd *, asymbol **)); | |
85fe7cff | 133 | extern int coff_count_linenumbers PARAMS ((bfd *)); |
075caafd | 134 | extern struct coff_symbol_struct *coff_symbol_from PARAMS ((bfd *, asymbol *)); |
326e32d7 | 135 | extern boolean coff_renumber_symbols PARAMS ((bfd *)); |
075caafd | 136 | extern void coff_mangle_symbols PARAMS ((bfd *)); |
e8fbe6d9 | 137 | extern boolean coff_write_symbols PARAMS ((bfd *)); |
326e32d7 | 138 | extern boolean coff_write_linenumbers PARAMS ((bfd *)); |
075caafd ILT |
139 | extern alent *coff_get_lineno PARAMS ((bfd *, asymbol *)); |
140 | extern asymbol *coff_section_symbol PARAMS ((bfd *, char *)); | |
141 | extern struct coff_ptr_struct *coff_get_normalized_symtab PARAMS ((bfd *)); | |
326e32d7 | 142 | extern long coff_get_reloc_upper_bound PARAMS ((bfd *, sec_ptr)); |
075caafd ILT |
143 | extern asymbol *coff_make_empty_symbol PARAMS ((bfd *)); |
144 | extern void coff_print_symbol PARAMS ((bfd *, PTR filep, asymbol *, | |
145 | bfd_print_symbol_type how)); | |
330595d0 ILT |
146 | extern void coff_get_symbol_info PARAMS ((bfd *, asymbol *, |
147 | symbol_info *ret)); | |
148 | extern asymbol *coff_bfd_make_debug_symbol PARAMS ((bfd *, PTR, | |
149 | unsigned long)); | |
075caafd ILT |
150 | extern boolean coff_find_nearest_line PARAMS ((bfd *, |
151 | asection *, | |
152 | asymbol **, | |
153 | bfd_vma offset, | |
154 | CONST char **filename_ptr, | |
155 | CONST char **functionname_ptr, | |
156 | unsigned int *line_ptr)); | |
157 | extern int coff_sizeof_headers PARAMS ((bfd *, boolean reloc)); | |
326e32d7 ILT |
158 | extern boolean bfd_coff_reloc16_relax_section |
159 | PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *)); | |
075caafd | 160 | extern bfd_byte *bfd_coff_reloc16_get_relocated_section_contents |
330595d0 ILT |
161 | PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, |
162 | bfd_byte *, boolean relocateable, asymbol **)); | |
075caafd | 163 | extern bfd_vma bfd_coff_reloc16_get_value PARAMS ((arelent *, |
330595d0 ILT |
164 | struct bfd_link_info *, |
165 | asection *)); | |
326e32d7 | 166 | extern void bfd_perform_slip PARAMS ((bfd *abfd, unsigned int slip, |
330595d0 | 167 | asection *input_section, |
326e32d7 | 168 | bfd_vma val)); |
3c8a3c56 | 169 | |
69645d10 ILT |
170 | /* Functions in cofflink.c. */ |
171 | ||
172 | extern struct bfd_link_hash_table *_bfd_coff_link_hash_table_create | |
173 | PARAMS ((bfd *)); | |
174 | extern boolean _bfd_coff_link_add_symbols | |
175 | PARAMS ((bfd *, struct bfd_link_info *)); | |
176 | extern boolean _bfd_coff_final_link | |
177 | PARAMS ((bfd *, struct bfd_link_info *)); | |
178 | ||
616ebcfd | 179 | /* And more taken from the source .. */ |
3c8a3c56 | 180 | |
326e32d7 | 181 | typedef struct coff_ptr_struct |
0cda46cf | 182 | { |
616ebcfd SC |
183 | |
184 | /* Remembers the offset from the first symbol in the file for | |
185 | this symbol. Generated by coff_renumber_symbols. */ | |
0cda46cf | 186 | unsigned int offset; |
616ebcfd | 187 | |
c8d672fe ILT |
188 | /* Should the value of this symbol be renumbered. Used for |
189 | XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. */ | |
190 | unsigned int fix_value : 1; | |
191 | ||
616ebcfd SC |
192 | /* Should the tag field of this symbol be renumbered. |
193 | Created by coff_pointerize_aux. */ | |
c8d672fe | 194 | unsigned int fix_tag : 1; |
616ebcfd SC |
195 | |
196 | /* Should the endidx field of this symbol be renumbered. | |
197 | Created by coff_pointerize_aux. */ | |
c8d672fe ILT |
198 | unsigned int fix_end : 1; |
199 | ||
200 | /* Should the x_csect.x_scnlen field be renumbered. | |
201 | Created by coff_slurp_symbol_table. */ | |
202 | unsigned int fix_scnlen : 1; | |
616ebcfd SC |
203 | |
204 | /* The container for the symbol structure as read and translated | |
205 | from the file. */ | |
206 | ||
0cda46cf SC |
207 | union { |
208 | union internal_auxent auxent; | |
209 | struct internal_syment syment; | |
210 | } u; | |
211 | } combined_entry_type; | |
616ebcfd SC |
212 | |
213 | ||
214 | /* Each canonical asymbol really looks like this: */ | |
215 | ||
0cda46cf SC |
216 | typedef struct coff_symbol_struct |
217 | { | |
07de8e96 KR |
218 | /* The actual symbol which the rest of BFD works with */ |
219 | asymbol symbol; | |
616ebcfd | 220 | |
07de8e96 KR |
221 | /* A pointer to the hidden information for this symbol */ |
222 | combined_entry_type *native; | |
c618de01 | 223 | |
07de8e96 KR |
224 | /* A pointer to the linenumber information for this symbol */ |
225 | struct lineno_cache_entry *lineno; | |
226 | ||
227 | /* Have the line numbers been relocated yet ? */ | |
228 | boolean done_lineno; | |
616ebcfd | 229 | } coff_symbol_type; |
326e32d7 | 230 | typedef struct |
075caafd | 231 | { |
07de8e96 | 232 | void (*_bfd_coff_swap_aux_in) PARAMS (( |
330595d0 | 233 | bfd *abfd, |
07de8e96 KR |
234 | PTR ext, |
235 | int type, | |
330595d0 ILT |
236 | int class, |
237 | int indaux, | |
238 | int numaux, | |
07de8e96 KR |
239 | PTR in)); |
240 | ||
241 | void (*_bfd_coff_swap_sym_in) PARAMS (( | |
242 | bfd *abfd , | |
243 | PTR ext, | |
244 | PTR in)); | |
245 | ||
246 | void (*_bfd_coff_swap_lineno_in) PARAMS (( | |
247 | bfd *abfd, | |
248 | PTR ext, | |
249 | PTR in)); | |
250 | ||
251 | unsigned int (*_bfd_coff_swap_aux_out) PARAMS (( | |
252 | bfd *abfd, | |
253 | PTR in, | |
254 | int type, | |
255 | int class, | |
330595d0 ILT |
256 | int indaux, |
257 | int numaux, | |
07de8e96 KR |
258 | PTR ext)); |
259 | ||
260 | unsigned int (*_bfd_coff_swap_sym_out) PARAMS (( | |
261 | bfd *abfd, | |
262 | PTR in, | |
263 | PTR ext)); | |
264 | ||
265 | unsigned int (*_bfd_coff_swap_lineno_out) PARAMS (( | |
266 | bfd *abfd, | |
267 | PTR in, | |
268 | PTR ext)); | |
269 | ||
270 | unsigned int (*_bfd_coff_swap_reloc_out) PARAMS (( | |
271 | bfd *abfd, | |
272 | PTR src, | |
273 | PTR dst)); | |
274 | ||
275 | unsigned int (*_bfd_coff_swap_filehdr_out) PARAMS (( | |
276 | bfd *abfd, | |
277 | PTR in, | |
278 | PTR out)); | |
279 | ||
280 | unsigned int (*_bfd_coff_swap_aouthdr_out) PARAMS (( | |
281 | bfd *abfd, | |
282 | PTR in, | |
283 | PTR out)); | |
284 | ||
285 | unsigned int (*_bfd_coff_swap_scnhdr_out) PARAMS (( | |
286 | bfd *abfd, | |
287 | PTR in, | |
288 | PTR out)); | |
289 | ||
075caafd ILT |
290 | unsigned int _bfd_filhsz; |
291 | unsigned int _bfd_aoutsz; | |
292 | unsigned int _bfd_scnhsz; | |
293 | unsigned int _bfd_symesz; | |
294 | unsigned int _bfd_auxesz; | |
69645d10 | 295 | unsigned int _bfd_relsz; |
075caafd ILT |
296 | unsigned int _bfd_linesz; |
297 | boolean _bfd_coff_long_filenames; | |
298 | void (*_bfd_coff_swap_filehdr_in) PARAMS (( | |
299 | bfd *abfd, | |
300 | PTR ext, | |
301 | PTR in)); | |
302 | void (*_bfd_coff_swap_aouthdr_in) PARAMS (( | |
303 | bfd *abfd, | |
304 | PTR ext, | |
305 | PTR in)); | |
306 | void (*_bfd_coff_swap_scnhdr_in) PARAMS (( | |
307 | bfd *abfd, | |
308 | PTR ext, | |
309 | PTR in)); | |
69645d10 ILT |
310 | void (*_bfd_coff_swap_reloc_in) PARAMS (( |
311 | bfd *abfd, | |
312 | PTR ext, | |
313 | PTR in)); | |
075caafd ILT |
314 | boolean (*_bfd_coff_bad_format_hook) PARAMS (( |
315 | bfd *abfd, | |
316 | PTR internal_filehdr)); | |
317 | boolean (*_bfd_coff_set_arch_mach_hook) PARAMS (( | |
318 | bfd *abfd, | |
319 | PTR internal_filehdr)); | |
320 | PTR (*_bfd_coff_mkobject_hook) PARAMS (( | |
321 | bfd *abfd, | |
85fe7cff PB |
322 | PTR internal_filehdr, |
323 | PTR internal_aouthdr)); | |
075caafd ILT |
324 | flagword (*_bfd_styp_to_sec_flags_hook) PARAMS (( |
325 | bfd *abfd, | |
e8fbe6d9 ILT |
326 | PTR internal_scnhdr, |
327 | const char *name)); | |
075caafd ILT |
328 | asection *(*_bfd_make_section_hook) PARAMS (( |
329 | bfd *abfd, | |
330 | char *name)); | |
331 | void (*_bfd_set_alignment_hook) PARAMS (( | |
332 | bfd *abfd, | |
333 | asection *sec, | |
334 | PTR internal_scnhdr)); | |
335 | boolean (*_bfd_coff_slurp_symbol_table) PARAMS (( | |
336 | bfd *abfd)); | |
337 | boolean (*_bfd_coff_symname_in_debug) PARAMS (( | |
338 | bfd *abfd, | |
339 | struct internal_syment *sym)); | |
340 | void (*_bfd_coff_reloc16_extra_cases) PARAMS (( | |
341 | bfd *abfd, | |
330595d0 ILT |
342 | struct bfd_link_info *link_info, |
343 | struct bfd_link_order *link_order, | |
075caafd ILT |
344 | arelent *reloc, |
345 | bfd_byte *data, | |
346 | unsigned int *src_ptr, | |
347 | unsigned int *dst_ptr)); | |
330595d0 | 348 | int (*_bfd_coff_reloc16_estimate) PARAMS (( |
326e32d7 | 349 | bfd *abfd, |
330595d0 | 350 | asection *input_section, |
330595d0 ILT |
351 | arelent *r, |
352 | unsigned int shrink, | |
353 | struct bfd_link_info *link_info)); | |
69645d10 ILT |
354 | boolean (*_bfd_coff_sym_is_global) PARAMS (( |
355 | bfd *abfd, | |
356 | struct internal_syment *)); | |
357 | void (*_bfd_coff_compute_section_file_positions) PARAMS (( | |
358 | bfd *abfd)); | |
359 | boolean (*_bfd_coff_relocate_section) PARAMS (( | |
360 | bfd *output_bfd, | |
361 | struct bfd_link_info *info, | |
362 | bfd *input_bfd, | |
363 | asection *input_section, | |
364 | bfd_byte *contents, | |
365 | struct internal_reloc *relocs, | |
366 | struct internal_syment *syms, | |
367 | asection **sections)); | |
330595d0 | 368 | |
07de8e96 KR |
369 | } bfd_coff_backend_data; |
370 | ||
07de8e96 KR |
371 | #define coff_backend_info(abfd) ((bfd_coff_backend_data *) (abfd)->xvec->backend_data) |
372 | ||
330595d0 ILT |
373 | #define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \ |
374 | ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i)) | |
07de8e96 KR |
375 | |
376 | #define bfd_coff_swap_sym_in(a,e,i) \ | |
377 | ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i)) | |
378 | ||
379 | #define bfd_coff_swap_lineno_in(a,e,i) \ | |
380 | ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i)) | |
381 | ||
382 | #define bfd_coff_swap_reloc_out(abfd, i, o) \ | |
383 | ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o)) | |
384 | ||
385 | #define bfd_coff_swap_lineno_out(abfd, i, o) \ | |
386 | ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o)) | |
387 | ||
330595d0 ILT |
388 | #define bfd_coff_swap_aux_out(a,i,t,c,ind,num,o) \ |
389 | ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o)) | |
07de8e96 KR |
390 | |
391 | #define bfd_coff_swap_sym_out(abfd, i,o) \ | |
392 | ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o)) | |
393 | ||
394 | #define bfd_coff_swap_scnhdr_out(abfd, i,o) \ | |
395 | ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o)) | |
396 | ||
397 | #define bfd_coff_swap_filehdr_out(abfd, i,o) \ | |
398 | ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o)) | |
399 | ||
400 | #define bfd_coff_swap_aouthdr_out(abfd, i,o) \ | |
401 | ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o)) | |
402 | ||
075caafd ILT |
403 | #define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz) |
404 | #define bfd_coff_aoutsz(abfd) (coff_backend_info (abfd)->_bfd_aoutsz) | |
405 | #define bfd_coff_scnhsz(abfd) (coff_backend_info (abfd)->_bfd_scnhsz) | |
406 | #define bfd_coff_symesz(abfd) (coff_backend_info (abfd)->_bfd_symesz) | |
407 | #define bfd_coff_auxesz(abfd) (coff_backend_info (abfd)->_bfd_auxesz) | |
69645d10 | 408 | #define bfd_coff_relsz(abfd) (coff_backend_info (abfd)->_bfd_relsz) |
075caafd ILT |
409 | #define bfd_coff_linesz(abfd) (coff_backend_info (abfd)->_bfd_linesz) |
410 | #define bfd_coff_long_filenames(abfd) (coff_backend_info (abfd)->_bfd_coff_long_filenames) | |
411 | #define bfd_coff_swap_filehdr_in(abfd, i,o) \ | |
412 | ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o)) | |
413 | ||
414 | #define bfd_coff_swap_aouthdr_in(abfd, i,o) \ | |
415 | ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o)) | |
416 | ||
417 | #define bfd_coff_swap_scnhdr_in(abfd, i,o) \ | |
418 | ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o)) | |
419 | ||
69645d10 ILT |
420 | #define bfd_coff_swap_reloc_in(abfd, i, o) \ |
421 | ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o)) | |
422 | ||
075caafd ILT |
423 | #define bfd_coff_bad_format_hook(abfd, filehdr) \ |
424 | ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr)) | |
425 | ||
426 | #define bfd_coff_set_arch_mach_hook(abfd, filehdr)\ | |
427 | ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr)) | |
85fe7cff PB |
428 | #define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\ |
429 | ((coff_backend_info (abfd)->_bfd_coff_mkobject_hook) (abfd, filehdr, aouthdr)) | |
075caafd | 430 | |
e8fbe6d9 ILT |
431 | #define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name)\ |
432 | ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook) (abfd, scnhdr, name)) | |
075caafd ILT |
433 | |
434 | #define bfd_coff_make_section_hook(abfd, name)\ | |
435 | ((coff_backend_info (abfd)->_bfd_make_section_hook) (abfd, name)) | |
436 | ||
437 | #define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\ | |
438 | ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr)) | |
439 | ||
440 | #define bfd_coff_slurp_symbol_table(abfd)\ | |
441 | ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd)) | |
442 | ||
443 | #define bfd_coff_symname_in_debug(abfd, sym)\ | |
444 | ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym)) | |
445 | ||
330595d0 | 446 | #define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)\ |
075caafd | 447 | ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\ |
330595d0 ILT |
448 | (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)) |
449 | ||
326e32d7 | 450 | #define bfd_coff_reloc16_estimate(abfd, section, reloc, shrink, link_info)\ |
330595d0 | 451 | ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\ |
326e32d7 ILT |
452 | (abfd, section, reloc, shrink, link_info)) |
453 | ||
69645d10 ILT |
454 | #define bfd_coff_sym_is_global(abfd, sym)\ |
455 | ((coff_backend_info (abfd)->_bfd_coff_sym_is_global)\ | |
456 | (abfd, sym)) | |
457 | ||
458 | #define bfd_coff_compute_section_file_positions(abfd)\ | |
459 | ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\ | |
460 | (abfd)) | |
461 | ||
462 | #define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\ | |
463 | ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\ | |
464 | (obfd, info, ibfd, o, con, rel, isyms, secs)) | |
465 |