diff options
author | Ian Lance Taylor <ian@airs.com> | 1995-09-14 19:03:21 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 1995-09-14 19:03:21 +0000 |
commit | a208a70f7a1a3418b11203867843fb2218c15d02 (patch) | |
tree | 95f1c1d349d0b2db42c5244ad1b7bf557316c45b /bfd/coffcode.h | |
parent | 4814df240eaff8078a63a412ac405709bd168455 (diff) | |
download | gdb-a208a70f7a1a3418b11203867843fb2218c15d02.zip gdb-a208a70f7a1a3418b11203867843fb2218c15d02.tar.gz gdb-a208a70f7a1a3418b11203867843fb2218c15d02.tar.bz2 |
Convert i960 COFF to use COFF backend linker.
* coff-i960.c (coff_i960_relocate): Use a coff_section_data
structure to store the symbol being used.
(coff_i960_start_final_link): New static function.
(coff_i960_relocate_section): New static function.
(coff_i960_adjust_symndx): New static function.
(coff_start_final_link): Define.
(coff_relocate_section): Define.
(coff_adjust_symndx): Define.
* coffcode.h (bfd_coff_backend_data): Add new callback function
_bfd_coff_start_final_link.
(bfd_coff_start_final_link): Define.
(coff_start_final_link): Define if not defined.
(bfd_coff_std_swap_table): Add coff_start_final_link.
* cofflink.c (_bfd_coff_internal_syment_name): Make globally
visible.
(_bfd_coff_final_link): Call bfd_coff_start_final_link if the
function callback is not NULL.
* libcoff-in.h (struct coff_section_tdata): Add tdata field.
(_bfd_coff_internal_syment_name): Declare.
* libcoff.h: Rebuild.
* configure.in (icoff_big_vec): Add cofflink.o.
(icoff_little_vec): Likewise.
* configure: Rebuild.
Diffstat (limited to 'bfd/coffcode.h')
-rw-r--r-- | bfd/coffcode.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/bfd/coffcode.h b/bfd/coffcode.h index dd772a8..e9a808c 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -681,6 +681,9 @@ dependent COFF routines: . struct internal_syment *)); . void (*_bfd_coff_compute_section_file_positions) PARAMS (( . bfd *abfd)); +. boolean (*_bfd_coff_start_final_link) PARAMS (( +. bfd *output_bfd, +. struct bfd_link_info *info)); . boolean (*_bfd_coff_relocate_section) PARAMS (( . bfd *output_bfd, . struct bfd_link_info *info, @@ -798,6 +801,9 @@ dependent COFF routines: . ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\ . (abfd)) . +.#define bfd_coff_start_final_link(obfd, info)\ +. ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\ +. (obfd, info)) .#define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\ . ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\ . (obfd, info, ibfd, o, con, rel, isyms, secs)) @@ -2814,6 +2820,10 @@ dummy_reloc16_extra_cases (abfd, link_info, link_order, reloc, data, src_ptr, #endif /* ! defined (coff_relocate_section) */ #define coff_bfd_link_split_section _bfd_generic_link_split_section +#ifndef coff_start_final_link +#define coff_start_final_link NULL +#endif + #ifndef coff_adjust_symndx #define coff_adjust_symndx NULL #endif @@ -2837,7 +2847,8 @@ static CONST bfd_coff_backend_data bfd_coff_std_swap_table = coff_set_alignment_hook, coff_slurp_symbol_table, symname_in_debug_hook, coff_reloc16_extra_cases, coff_reloc16_estimate, coff_sym_is_global, coff_compute_section_file_positions, - coff_relocate_section, coff_rtype_to_howto, coff_adjust_symndx + coff_start_final_link, coff_relocate_section, coff_rtype_to_howto, + coff_adjust_symndx }; #define coff_close_and_cleanup _bfd_generic_close_and_cleanup |