Deleted Added
full compact
aout-target.h (104834) aout-target.h (130561)
1/* Define a target vector and some small routines for a variant of a.out.
2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
1/* Define a target vector and some small routines for a variant of a.out.
2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
3 2000, 2001, 2002
3 2000, 2001, 2002, 2003
4 Free Software Foundation, Inc.
5
6This file is part of BFD, the Binary File Descriptor library.
7
8This program is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2 of the License, or
11(at your option) any later version.

--- 184 unchanged lines hidden (view full) ---

196
197 return target;
198}
199#define MY_object_p MY(object_p)
200#endif
201
202#ifndef MY_mkobject
203
4 Free Software Foundation, Inc.
5
6This file is part of BFD, the Binary File Descriptor library.
7
8This program is free software; you can redistribute it and/or modify
9it under the terms of the GNU General Public License as published by
10the Free Software Foundation; either version 2 of the License, or
11(at your option) any later version.

--- 184 unchanged lines hidden (view full) ---

196
197 return target;
198}
199#define MY_object_p MY(object_p)
200#endif
201
202#ifndef MY_mkobject
203
204static boolean MY(mkobject) PARAMS ((bfd *));
204static bfd_boolean MY(mkobject) PARAMS ((bfd *));
205
205
206static boolean
206static bfd_boolean
207MY(mkobject) (abfd)
208 bfd *abfd;
209{
210 if (! NAME(aout,mkobject) (abfd))
207MY(mkobject) (abfd)
208 bfd *abfd;
209{
210 if (! NAME(aout,mkobject) (abfd))
211 return false;
211 return FALSE;
212#if 0 /* Sizes get set in set_sizes callback, later, after we know
213 the architecture and machine. */
214 adata(abfd).page_size = TARGET_PAGE_SIZE;
215 adata(abfd).segment_size = SEGMENT_SIZE;
216 adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
217#endif
212#if 0 /* Sizes get set in set_sizes callback, later, after we know
213 the architecture and machine. */
214 adata(abfd).page_size = TARGET_PAGE_SIZE;
215 adata(abfd).segment_size = SEGMENT_SIZE;
216 adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
217#endif
218 return true;
218 return TRUE;
219}
220#define MY_mkobject MY(mkobject)
221#endif
222
223#ifndef MY_bfd_copy_private_section_data
224
225/* Copy private section data. This actually does nothing with the
226 sections. It copies the subformat field. We copy it here, because
227 we need to know whether this is a QMAGIC file before we set the
228 section contents, and copy_private_bfd_data is not called until
229 after the section contents have been set. */
230
219}
220#define MY_mkobject MY(mkobject)
221#endif
222
223#ifndef MY_bfd_copy_private_section_data
224
225/* Copy private section data. This actually does nothing with the
226 sections. It copies the subformat field. We copy it here, because
227 we need to know whether this is a QMAGIC file before we set the
228 section contents, and copy_private_bfd_data is not called until
229 after the section contents have been set. */
230
231static boolean MY_bfd_copy_private_section_data
231static bfd_boolean MY_bfd_copy_private_section_data
232 PARAMS ((bfd *, asection *, bfd *, asection *));
233
232 PARAMS ((bfd *, asection *, bfd *, asection *));
233
234static boolean
234static bfd_boolean
235MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
236 bfd *ibfd;
237 asection *isec ATTRIBUTE_UNUSED;
238 bfd *obfd;
239 asection *osec ATTRIBUTE_UNUSED;
240{
241 if (bfd_get_flavour (ibfd) == bfd_target_aout_flavour
242 && bfd_get_flavour (obfd) == bfd_target_aout_flavour)
243 obj_aout_subformat (obfd) = obj_aout_subformat (ibfd);
235MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
236 bfd *ibfd;
237 asection *isec ATTRIBUTE_UNUSED;
238 bfd *obfd;
239 asection *osec ATTRIBUTE_UNUSED;
240{
241 if (bfd_get_flavour (ibfd) == bfd_target_aout_flavour
242 && bfd_get_flavour (obfd) == bfd_target_aout_flavour)
243 obj_aout_subformat (obfd) = obj_aout_subformat (ibfd);
244 return true;
244 return TRUE;
245}
246
247#endif
248
249/* Write an object file.
250 Section contents have already been written. We write the
251 file header, symbols, and relocation. */
252
253#ifndef MY_write_object_contents
245}
246
247#endif
248
249/* Write an object file.
250 Section contents have already been written. We write the
251 file header, symbols, and relocation. */
252
253#ifndef MY_write_object_contents
254static boolean MY(write_object_contents) PARAMS ((bfd *));
254static bfd_boolean MY(write_object_contents) PARAMS ((bfd *));
255
255
256static boolean
256static bfd_boolean
257MY(write_object_contents) (abfd)
258 bfd *abfd;
259{
260 struct external_exec exec_bytes;
261 struct internal_exec *execp = exec_hdr (abfd);
262
263 obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
264
265 WRITE_HEADERS(abfd, execp);
266
257MY(write_object_contents) (abfd)
258 bfd *abfd;
259{
260 struct external_exec exec_bytes;
261 struct internal_exec *execp = exec_hdr (abfd);
262
263 obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
264
265 WRITE_HEADERS(abfd, execp);
266
267 return true;
267 return TRUE;
268}
269#define MY_write_object_contents MY(write_object_contents)
270#endif
271
272#ifndef MY_set_sizes
273
268}
269#define MY_write_object_contents MY(write_object_contents)
270#endif
271
272#ifndef MY_set_sizes
273
274static boolean MY(set_sizes) PARAMS ((bfd *));
274static bfd_boolean MY(set_sizes) PARAMS ((bfd *));
275
275
276static boolean
276static bfd_boolean
277MY(set_sizes) (abfd)
278 bfd *abfd;
279{
280 adata(abfd).page_size = TARGET_PAGE_SIZE;
281 adata(abfd).segment_size = SEGMENT_SIZE;
282
283#ifdef ZMAGIC_DISK_BLOCK_SIZE
284 adata(abfd).zmagic_disk_block_size = ZMAGIC_DISK_BLOCK_SIZE;
285#else
286 adata(abfd).zmagic_disk_block_size = TARGET_PAGE_SIZE;
287#endif
288
289 adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
277MY(set_sizes) (abfd)
278 bfd *abfd;
279{
280 adata(abfd).page_size = TARGET_PAGE_SIZE;
281 adata(abfd).segment_size = SEGMENT_SIZE;
282
283#ifdef ZMAGIC_DISK_BLOCK_SIZE
284 adata(abfd).zmagic_disk_block_size = ZMAGIC_DISK_BLOCK_SIZE;
285#else
286 adata(abfd).zmagic_disk_block_size = TARGET_PAGE_SIZE;
287#endif
288
289 adata(abfd).exec_bytes_size = EXEC_BYTES_SIZE;
290 return true;
290 return TRUE;
291}
292#define MY_set_sizes MY(set_sizes)
293#endif
294
295#ifndef MY_exec_hdr_flags
296#define MY_exec_hdr_flags 0
297#endif
298

--- 71 unchanged lines hidden (view full) ---

370
371#endif
372
373#ifndef MY_bfd_final_link
374
375/* Final link routine. We need to use a call back to get the correct
376 offsets in the output file. */
377
291}
292#define MY_set_sizes MY(set_sizes)
293#endif
294
295#ifndef MY_exec_hdr_flags
296#define MY_exec_hdr_flags 0
297#endif
298

--- 71 unchanged lines hidden (view full) ---

370
371#endif
372
373#ifndef MY_bfd_final_link
374
375/* Final link routine. We need to use a call back to get the correct
376 offsets in the output file. */
377
378static boolean MY_bfd_final_link PARAMS ((bfd *, struct bfd_link_info *));
378static bfd_boolean MY_bfd_final_link PARAMS ((bfd *, struct bfd_link_info *));
379
379
380static boolean
380static bfd_boolean
381MY_bfd_final_link (abfd, info)
382 bfd *abfd;
383 struct bfd_link_info *info;
384{
385 return NAME(aout,final_link) (abfd, info, MY_final_link_callback);
386}
387
388#endif

--- 49 unchanged lines hidden (view full) ---

438#ifndef MY_bfd_debug_info_start
439#define MY_bfd_debug_info_start bfd_void
440#endif
441#ifndef MY_bfd_debug_info_end
442#define MY_bfd_debug_info_end bfd_void
443#endif
444#ifndef MY_bfd_debug_info_accumulate
445#define MY_bfd_debug_info_accumulate \
381MY_bfd_final_link (abfd, info)
382 bfd *abfd;
383 struct bfd_link_info *info;
384{
385 return NAME(aout,final_link) (abfd, info, MY_final_link_callback);
386}
387
388#endif

--- 49 unchanged lines hidden (view full) ---

438#ifndef MY_bfd_debug_info_start
439#define MY_bfd_debug_info_start bfd_void
440#endif
441#ifndef MY_bfd_debug_info_end
442#define MY_bfd_debug_info_end bfd_void
443#endif
444#ifndef MY_bfd_debug_info_accumulate
445#define MY_bfd_debug_info_accumulate \
446 (void (*) PARAMS ((bfd*, struct sec *))) bfd_void
446 (void (*) PARAMS ((bfd*, struct bfd_section *))) bfd_void
447#endif
448
449#ifndef MY_core_file_failing_command
450#define MY_core_file_failing_command NAME(aout,core_file_failing_command)
451#endif
452#ifndef MY_core_file_failing_signal
453#define MY_core_file_failing_signal NAME(aout,core_file_failing_signal)
454#endif

--- 10 unchanged lines hidden (view full) ---

465#define MY_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
466#endif
467#ifndef MY_new_section_hook
468#define MY_new_section_hook NAME(aout,new_section_hook)
469#endif
470#ifndef MY_get_symtab_upper_bound
471#define MY_get_symtab_upper_bound NAME(aout,get_symtab_upper_bound)
472#endif
447#endif
448
449#ifndef MY_core_file_failing_command
450#define MY_core_file_failing_command NAME(aout,core_file_failing_command)
451#endif
452#ifndef MY_core_file_failing_signal
453#define MY_core_file_failing_signal NAME(aout,core_file_failing_signal)
454#endif

--- 10 unchanged lines hidden (view full) ---

465#define MY_get_section_contents_in_window _bfd_generic_get_section_contents_in_window
466#endif
467#ifndef MY_new_section_hook
468#define MY_new_section_hook NAME(aout,new_section_hook)
469#endif
470#ifndef MY_get_symtab_upper_bound
471#define MY_get_symtab_upper_bound NAME(aout,get_symtab_upper_bound)
472#endif
473#ifndef MY_get_symtab
474#define MY_get_symtab NAME(aout,get_symtab)
473#ifndef MY_canonicalize_symtab
474#define MY_canonicalize_symtab NAME(aout,canonicalize_symtab)
475#endif
476#ifndef MY_get_reloc_upper_bound
477#define MY_get_reloc_upper_bound NAME(aout,get_reloc_upper_bound)
478#endif
479#ifndef MY_canonicalize_reloc
480#define MY_canonicalize_reloc NAME(aout,canonicalize_reloc)
481#endif
482#ifndef MY_make_empty_symbol

--- 180 unchanged lines hidden ---
475#endif
476#ifndef MY_get_reloc_upper_bound
477#define MY_get_reloc_upper_bound NAME(aout,get_reloc_upper_bound)
478#endif
479#ifndef MY_canonicalize_reloc
480#define MY_canonicalize_reloc NAME(aout,canonicalize_reloc)
481#endif
482#ifndef MY_make_empty_symbol

--- 180 unchanged lines hidden ---