aboutsummaryrefslogtreecommitdiff
path: root/bfd/coffcode.h
AgeCommit message (Collapse)AuthorFilesLines
1994-04-05 * aoutx.h (NAME(aout,canonicalize_reloc)): Don't error out ifIan Lance Taylor1-2/+0
section->relocation is NULL; malloc might have returned NULL when given a zero size if there were no relocations. * bout.c (b_out_canonicalize_reloc): Likewise. * coffcode.h (coff_canonicalize_reloc): Likewise. * ecoff.c (ecoff_canonicalize_reloc): Likewise. * elfcode.h (elf_canonicalize_reloc): Likewise. * mipsbsd.c (MY(canonicalize_reloc)): Likewise. * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise. * nlmcode.h (nlm_canonicalize_reloc): Likewise. * som.c (som_canonicalize_reloc): Likewise. * hp300hpux.c (MY(slurp_reloc_table)): Likewise. Also, if malloc returns NULL, don't report an error if we asked for zero bytes. * i386lynx.c (NAME(lynx,slurp_reloc_table)): If malloc returns NULL, don't report an error if we asked for zero bytes. * nlmcode.h (nlm_slurp_reloc_fixups): Likewise.
1994-04-04 Made sure that every call to bfd_read, bfd_write, and bfd_seekIan Lance Taylor1-20/+29
checks the return value and handled bfd_error correctly. These changes are not itemised. Also: * coffcode.h (coff_write_relocs): Change return type to boolean, and return errors. (coff_write_object_contents): Check coff_write_relocs return value.
1994-04-01 * targets.c (bfd_target): Add _bfd_free_cached_info field.Ian Lance Taylor1-0/+1
* bfd.c (bfd_free_cached_info): Define. * bfd-in.h (JUMP_TABLE): Add _bfd_free_cached_info. * bfd-in2.h: Rebuilt. * All backends: Initialize bfd_free_cached_info entry point to bfd_true.
1994-03-31 * coffcode.h (CALC_ADDEND): Change to fetch original symbol valueIan Lance Taylor1-10/+17
from original BFD, rather than using value of current BFD symbol. Needed for new linker. * coff-sparc.c (CALC_ADDEND): Likewise.
1994-03-31 * coffgen.c (coff_write_symbol): Reindented. Changed to returnIan Lance Taylor1-1/+2
boolean, and changed written to unsigned int *. Check error returns from called functions. (coff_write_alien_symbol): Likewise. (coff_write_native_symbol): Likewise. (coff_write_symbols): Likewise. Reworked checks on whether to write symbol name to string table for clarity and to avoid core dumping when given a non COFF symbol. * libcoff-in.h (coff_write_symbols): Declare as returning boolean. * libcoff.h: Rebuilt. * coffcode.h (coff_write_object_contents): Check return value of coff_write_symbols.
1994-03-30Wed Mar 30 16:25:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)Ian Lance Taylor1-4/+4
Changes to let BFD return an error indication from get_symtab_upper_bound, bfd_canonicalize_symtab, bfd_get_reloc_upper_bound, and bfd_canonicalize_reloc. They now return long instead of unsigned int, and use -1 to indicate an error. Along the way, rename get_symtab_upper_bound to bfd_get_symtab_upper_bound. * bfd.c (bfd_get_reloc_upper_bound): Return long, and -1 on errors. (bfd_canonicalize_reloc): Likewise. * syms.c (bfd_get_symtab_upper_bound): Renamed from get_symtab_upper_bound. * targets.c (bfd_target): Renamed _get_symtab_upper_bound to _bfd_get_symtab_upper_bound, and changed it and _bfd_canonicalize_symtab and _get_reloc_upper_bound and _bfd_canonicalize_reloc to all return long. * aoutx.h (NAME(aout,get_symtab)): Return long, and -1 on errors. (NAME(aout,canonicalize_reloc)): Likewise. (NAME(aout,get_reloc_upper_bound)): Likewise. (NAME(aout,get_symtab_upper_bound)): Likewise. * bout.c (b_out_canonicalize_reloc): Likewise. (b_out_get_reloc_upper_bound): Likewise. * coffcode.h (coff_canonicalize_reloc): Likewise. * coffgen.c (coff_get_symtab_upper_bound): Likewise. (coff_get_symtab): Likewise. (coff_get_reloc_upper_bound): Likewise. * ecoff.c (ecoff_get_symtab_upper_bound): Likewise. (ecoff_get_symtab): Likewise. (ecoff_canonicalize_reloc): Likewise. * elfcode.h (elf_get_symtab_upper_bound): Likewise. (elf_get_reloc_upper_bound): Likewise. (elf_canonicalize_reloc): Likewise. (elf_get_symtab): Likewise. * hp300hpux.c (MY(get_symtab)): Likewise. (MY(get_symtab_upper_bound)): Likewise. (MY(canonicalize_reloc)): Likewise. * i386lynx.c (NAME(lynx,canonicalize_reloc)): Likewise. * ieee.c (ieee_slurp_external_symbols): Change return type to boolean. Check for errors from get_symbol. (ieee_slurp_symbol_table): Change return type to boolean. Check for errors from ieee_slurp_external_symbols. (ieee_get_symtab_upper_bound): Return long, and -1 on errors. (ieee_get_symtab): Likewise. (ieee_get_reloc_upper_bound): Likewise. (ieee_canonicalize_reloc): Likewise. * mipsbsd.c (MY(canonicalize_reloc)): Likewise. * nlmcode.h (nlm_get_symtab_upper_bound): Likewise. (nlm_get_symtab): Likewise. (nlm_get_reloc_upper_bound): Likewise. (nlm_canonicalize_reloc): Likewise. * oasys.c (oasys_get_symtab_upper_bound): Likewise. (oasys_get_symtab): Likewise. (oasys_get_reloc_upper_bound): Likewise. (oasys_canonicalize_reloc): Likewise. * som.c (som_get_symtab_upper_bound): Likewise. (som_get_symtab): Likewise. (som_get_reloc_upper_bound): Likewise. (som_canonicalize_reloc): Likewise. * srec.c (srec_get_symtab_upper_bound): Likewise. (srec_get_symtab): Likewise. (srec_get_reloc_upper_bound): Define as bfd_0l. (srec_canonicalize_reloc): Likewise. * tekhex.c (tekhex_get_symtab): Return long, and -1 on errors. (tekhex_get_symtab_upper_bound): Likewise. (tekhex_get_reloc_upper_bound): Define as bfd_0l. (tekhex_canonicalize_reloc): Likewise. * libaout.h (NAME(aout,get_symtab_upper_bound)): Change declaration to return long. (NAME(aout,get_symtab)): Likewise. (NAME(aout,canonicalize_reloc)): Likewise. (NAME(aout,get_reloc_upper_bound)): Likewise. * libcoff-in.h (coff_get_symtab_upper_bound): Likewise. (coff_get_symtab): Likewise. (coff_get_reloc_upper_bound): Likewise. * libecoff.h (ecoff_get_symtab_upper_bound): Likewise. (ecoff_get_symtab): Likewise. (ecoff_canonicalize_reloc): Likewise. * libelf.h (bfd_elf32_get_symtab_upper_bound): Likewise. (bfd_elf32_get_symtab): Likewise. (bfd_elf32_get_reloc_upper_bound): Likewise. (bfd_elf32_canonicalize_reloc): Likewise. (bfd_elf64_get_symtab_upper_bound): Likewise. (bfd_elf64_get_symtab): Likewise. (bfd_elf64_get_reloc_upper_bound): Likewise. (bfd_elf64_canonicalize_reloc): Likewise. * libnlm.h (nlmNAME(get_symtab_upper_bound)): Likewise. (nlmNAME(get_symtab)): Likewise. (nlmNAME(get_reloc_upper_bound)): Likewise. (nlmNAME(canonicalize_reloc)): Likewise. * archive.c (compute_and_write_armap): Use error_return and no_memory_return labels rather than freeing information in various places. Change storage, symcount and src_count to long. Check errors from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab. * bout.c (b_out_relax_section): Change reloc_size to long. Check for errors from bfd_get_reloc_upper_bound and bfd_canonicalize_reloc. (b_out_get_relocated_section_contents): Likewise. * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise. * elf32-mips.c: Likewise. * elf32-hppa.c (hppa_elf_stub_finish): Likewise. (hppa_look_for_stubs_in_section): Check for errors from bfd_get_symtab_upper_bound, bfd_canonicalize_symtab, and bfd_canonicalize_reloc. * ecofflink.c (bfd_ecoff_debug_accumulate_other): Check for errors from bfd_get_symtab_upper_bound and bfd_canonicalize_symtab. * linker.c (generic_link_read_symbols): Likewise. (_bfd_generic_final_link): Check for errors from bfd_get_reloc_upper_bound and bfd_canonicalize_reloc. * reloc.c (bfd_generic_get_relocated_section_contents): Likewise. * reloc16.c (bfd_coff_reloc16_relax_section): Likewise. (bfd_coff_reloc16_get_relocated_section_contents): Likewise. * libbfd.c (bfd_0l): New function. * libbfd-in.h (bfd_0l): Declare. * aix386-core.c: Change get_symtab_upper_bound, get_symtab, get_reloc_upper_bound, and canonicalize_reloc to use bfd_0l rather than bfd_0u. * cisco-core.c, hppabsd-core.c, hpux-core.c: Likewise. * irix-core.c, osf-core.c, ptrace-core.c, trad-core.c: Likewise. * bfd-in2.h: Rebuilt. * libbfd.h: Rebuilt. * libcoff.h: Rebuilt. * nlm32-sparc.c (nlm_sparc_read_reloc): Remove unused variables temp and name.
1994-03-28 * coffcode.h (coff_set_flags): Handle bfd_arch_powerpc likeIan Lance Taylor1-5/+18
bfd_arch_rs6000.
1994-03-15 * Most files:David MacKenzie1-66/+66
Replace DEFUN and DEFUN_VOID with K&R-style function definition. Indent some of them to GNU standards. * aout32.c, archures.c, core.c, cpu-h8300.c, cpu-i960.c, cpu-m68k.c, cpu-m88k.c, cpu-mips.c, cpu-vax.c, ctor.c, demo64.c, elf32-hppa.h, gen-aout.c, host-aout.c, init.c, libhppa.h, libieee.h, liboasys.h, newsos3.c, som.h, stab-syms.c, sunos.c: Update copyright years.
1994-02-12 Make all callers of malloc or realloc (including via obstacks)David MacKenzie1-883/+988
check the result for NULL. Most set bfd_error to no_memory and return in that case; a few are harder to fix, and are marked with "FIXME <return type>". * elf32-hppa.c (hppa_elf_build_arg_reloc_stub hppa_elf_build_long_branch_stub): Check bfd_make_empty_symbol return. * linker.c (_bfd_generic_link_output_symbols _bfd_generic_link_write_global_symbol): Ditto * section.c (bfd_make_section_anyway): Ditto. * tekhex.c (find_chunk tekhex_mkobject): Check bfd_alloc. (first_phase): Ditto. FIXME void (tekhex_make_empty_symbol): Check bfd_zalloc. * sunos.c (sunos_read_dynamic_info): Check bfd_zalloc. (MY(read_dynamic_symbols) MY(read_dynamic_relocs)): Check bfd_alloc. * stringhash.c (_bfd_stringtab_hash_newfunc): Check bfd_hash_allocate. * srec.c: Indent. (fillup_symbols): Check bfd_alloc. FIXME void (srec_mkobject srec_get_section_contents srec_set_section_contents): Check bfd_alloc. (srec_make_empty_symbol): Check bfd_zalloc. * som.c (hppa_som_gen_reloc_type): Check bfd_alloc_by_size_t. (make_unique_section): Check bfd_alloc. (som_new_section_hook): Check bfd_zalloc. (bfd_som_attach_aux_hdr): Ditto. FIXME void * rs6000-core.c (rs6000coff_core_p): Check bfd_zalloc. * osf-core.c (osf_core_make_empty_symbol): Check bfd_zalloc. (osf_core_core_file_p): Check bfd_alloc. * oasys.c (oasys_slurp_symbol_table oasys_archive_p oasys_mkobject oasys_object_p oasys_new_section_hook oasys_set_section_contents): Check bfd_alloc. (oasys_slurp_section_data): Check bfd_zalloc and bfd_alloc. (oasys_make_empty_symbol): Check bfd_zalloc. * nlmcode.h (nlm_make_empty_symbol): Check bfd_zalloc. (nlm_slurp_symbol_table): Check bfd_zalloc and bfd_alloc. * nlm32-sparc.c (nlm_sparc_read_import): Check bfd_alloc. * nlm32-i386.c (nlm_i386_read_import): Check bfd_alloc. * nlm32-alpha.c (nlm_alpha_read_import): Check bfd_alloc. * linker.c (_bfd_link_hash_newfunc (generic_link_hash_newfunc (archive_hash_newfunc (_bfd_generic_link_add_one_symbol): Check bfd_hash_allocate. (_bfd_generic_final_link (_bfd_generic_link_output_symbols (default_indirect_link_order): Check bfd_alloc. (bfd_new_link_order): Check bfd_alloc_by_size_t. * irix-core.c (irix_core_make_empty_symbol): Check bfd_zalloc. * ieee.c: Indent. (read_id get_symbol get_section_entry ieee_archive_p ieee_object_p ieee_slurp_section_data ieee_new_section_hook): Check bfd_alloc. (do_one): Check bfd_alloc. Return a boolean. (ieee_slurp_section_data): Check it. (init_for_output): Check bfd_alloc. Return a boolean. (ieee_set_section_contents): Check it. (do_with_relocs): Check bfd_alloc. Return a boolean. (ieee_bfd_debug_info_accumulate): Ditto. FIXME void. (ieee_mkobject): Check bfd_zalloc. (ieee_make_empty_symbol): Check bfd_zmalloc. * hpux-core.c (hpux_core_make_empty_symbol): Check bfd_zalloc. * hppabsd-core.c (hppabsd_core_make_empty_symbol): Check bfd_zalloc. (hppabsd_core_core_file_p): Check bfd_zalloc. * hp300hpux.c (MY(slurp_symbol_table)): Check bfd_alloc. * elfcode.h (elf_new_section_hook): Check bfd_alloc. (bfd_section_from_phdr): Ditto. (write_relocs): Ditto. FIXME void (elf_map_symbols assign_section_numbers map_program_segments): Ditto. Return a boolean. (swap_out_syms): Ditto. Check elf_map_symbols. (elf_slurp_symbol_table): Check bfd_zalloc. (elf_slurp_reloca_table): Check bfd_alloc. (elf_slurp_reloc_table): Ditto. (elf_compute_section_file_positions): Check assign_section_numbers. (assign_file_positions_except_relocs): Return a boolean. Check map_program_segments. (elf_compute_section_file_positions): Check it. * elf32-mips.c (mips_elf_final_link): Check bfd_alloc. * elf32-hppa.c (hppa_elf_stub_branch_reloc): Check bfd_zmalloc and realloc. (hppa_elf_stub_reloc): Ditto. (hppa_elf_build_arg_reloc_stub): Check bfd_zalloc. (hppa_elf_build_long_branch_stub): Ditto. (elf32_hppa_backend_symbol_table_processing): Ditto. * ecoff.c (ecoff_set_symbol_info): Check bfd_alloc. Return a boolean. (ecoff_slurp_symbol_table): Check it. (ecoff_slurp_armap): Check bfd_alloc. (ecoff_write_armap): Check bfd_zalloc. (ecoff_link_hash_newfunc): Check bfd_hash_allocate and _bfd_link_hash_newfunc. (ecoff_link_add_externals): Check bfd_alloc. * ctor.c (bfd_constructor_entry): Check bfd_alloc. * coffgen.c (coff_real_object_p): Check bfd_alloc. (coff_renumber_symbols): Check bfd_alloc_by_size_t. Return a boolean. (coff_write_symbol): Check bfd_alloc. FIXME int (coff_write_linenumbers): Check bfd_alloc. Return a boolean. (coff_section_symbol): Check bfd_alloc_by_size_t. (coff_get_normalized_symtab): Check bfd_alloc. (coff_bfd_make_debug_symbol): Check bfd_zalloc. * libcoff-in.h: Change decls of coff_renumber_symbols, coff_write_linenumbers. * libcoff.h: Rebuilt. * coffcode.h (coff_write_object_contents): Check coff_renumber_symbols, coff_write_linenumbers. * coffcode.h: Indent. (coff_add_missing_symbols): Check bfd_alloc_by_size_t. Return a boolean. (coff_write_object_contents): Check it. * coff-alpha.c (alpha_relocate_section): Check bfd_alloc. * coff-mips.c (mips_relocate_section): Ditto. * archive.c (bfd_slurp_bsd_armap_f2): Check bfd_alloc value. (do_slurp_bsd_armap): Ditto. (compute_and_write_armap): Check bfd_realloc value. * aoutx.h (translate_from_native_sym_flags): Check bfd_alloc return value. Return boolean value. (NAME(aout,make_empty_symbol)): Check bfd_zalloc return value. (NAME(aout,slurp_symbol_table)): Check bf_alloc and bfd_zalloc return value. (add_to_stringtab): Ditto. FIXME void (aout_link_hash_newfunc): Check bfd_hash_allocate return value. (aout_link_add_symbols): Check bfd_alloc value. (translate_symbol_table): Check translate_from_native_sym_flags. * hp300hpux.c (MY(slurp_symbol_table)): Ditto. * aoutx.h (aout_link_hash_newfunc): Check _bfd_link_hash_newfunc. * opncls.c (bfd_zalloc bfd_realloc): Check result of bfd_alloc. * opncls.c (obstack_chunk_alloc): Define as malloc, not bfd_xmalloc_by_size_t. (_bfd_new_bfd): Check obstack_begin for 0 return. * ieee.c (obstack_chunk_alloc): Define as malloc, not bfd_xmalloc_by_size_t. (ieee_archive_p): Check obstack_begin for 0 return and obstack_finish for NULL return. * hash.c (obstack_chunk_alloc): Define as malloc, not bfd_xmalloc_by_size_t. (bfd_hash_table_init_n): Check obstack_begin for 0 return and obstack_finish for NULL return. (bfd_hash_lookup): Check obstack_alloc for NULL return. * ecofflink.c (obstack_chunk_alloc): Define as malloc, not bfd_xmalloc_by_size_t. bfd_ecoff_debug_accumulate bfd_ecoff_debug_accumulate_other): Check obstack_alloc. (add_file_shuffle add_memory_shuffle): Check obstack_alloc for NULL return. Return boolean, not void. (bfd_ecoff_debug_init): Check obstack_begin for 0 return. (bfd_ecoff_debug_accumulate): Check add_file_shuffle and add_memory_shuffle return. (string_hash_newfunc): Check bfd_hash_allocate and bfd_hash_newfunc. (bfd_ecoff_debug_accumulate): Check bfd_alloc. (ecoff_add_string): Check add_memory_shuffle return. * libbfd-in.h (xmalloc, bfd_xmalloc, bfd_xmalloc_by_size_t): Remove decls. * libbfd.h: Rebuilt.
1994-02-02 * coffcode.h (coff_write_relocs): If SELECT_RELOC is defined, passIan Lance Taylor1-2/+2
in the internal_reloc itself, not the type. * coff-apollo.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-m68k.c, coff-sh.c, coff-we32k.c, coff-z8k.c: Changed definition of SELECT_RELOC accordingly.
1994-02-01 * coffcode.h (bfd_coff_backend_data): Added new arguments toIan Lance Taylor1-17/+27
_bfd_coff_swap_aux_in and _bfd_coff_swap_aux_out: aux index number and number of aux entries. (bfd_coff_swap_aux_in, bfd_coff_swap_aux_out): Changed accordingly. * libcoff.h: Rebuilt. * coffswap.h (coff_swap_aux_in, coff_swap_aux_out): Accept new arguments. If RS6000COFF_C, only treat C_EXT and C_HIDEXT specially if this is the last aux entry. * coffgen.c (coff_write_symbol, coff_get_normalized_symtab): Pass new arguments to swap_aux functions.
1993-12-21(coff_write_relocs) [SWAP_OUT_RELOC_OFFSET]: Copy addend to r_offset field.Ken Raeburn1-37/+35
1993-11-19(coff_bfd_reloc_type_lookup): Don't define if already defined.Ken Raeburn1-42/+52
(coff_slurp_line_table): Reformatted.
1993-11-05doc cleanupDavid MacKenzie1-71/+99
1993-10-25 Fix up warnings from gcc -Wall:Ian Lance Taylor1-11/+9
* coffgen.c (coff_print_symbol): Use %lx and cast n_value to unsigned long. Use %ld for tagndx. Use %lx for offset + vma and cast it to unsigned long. * ecoff.c (ecoff_emit_aggregate): Use %ld. (ecoff_print_symbol): Use %ld, and cast indx and sym_base to long. * coffcode.h (dummy_reloc16_estimate): Specify return type.
1993-10-13More "make dep" fixups.Ken Raeburn1-0/+18
Apollo 68k support from Troy Rollo <troy@cbme.unsw.edu.au>.
1993-10-07 * coffswap.h: (bfd_swap_reloc_in): a symndx is signed.Steve Chamberlain1-45/+88
1993-08-04 * coff-h8500.c (rtype2howto): Do an fprintf to stderr rather thanIan Lance Taylor1-5/+6
using printf. * coff-z8k.c (rtype2howto): Likewise. * coffcode.h (dummy_reloc16_extra_cases): Likewise. * elf32-i386.c (TRACE): Likewise. * hp300hpux.c (convert_sym_type, swap_std_reloc_in): Likewise. * rs6000-core.c (rs6000coff_get_section_contents): Likewise. * coffgen.c (coff_print_symbol): Do an fprintf to the file argument rather than using printf.
1993-07-11 * elfcode.h: Use memset not bzero.Jim Kingdon1-9/+27
* trad-core.c: Don't include <sys/file.h>. * i386linux.h: Include <sys/file.h>. * coff-m68k-un.c: new file to handle names with underscores on svr3 machines. * coff-m68k.c (m68k_rtype2howto): added #ifdef ONLY_DECLARE_RELOCS to not duplicate the function in the executable. (TARGET_SYM, TARGET_NAME, NAMES_HAVE_UNDERSCORE): new macros needed by coff-m68k-un.c. * coffcode.h (MC68KBCSMAGIC): case added. * targets.c: Add m68kcoffun_vec. * configure.host: added support for Bull dpx/2. * config/dpx2.mh, hosts/dpx2.h: new files. * Makefile.in: added target coff-m68k-un.
1993-04-30 * coffcode.h: use dummy_reloc16_extra_cases rather than casting abort.Jim Kingdon1-3/+13
1993-04-27Support for Hitachi SHSteve Chamberlain1-1/+16
1993-04-25* coffcode.h [_LIT]: Recognize .lit section.Jim Kingdon1-3/+22
1993-04-04 * coffcode.h (coff_set_section_contents): Don't write outSteve Chamberlain1-3/+12
> >> * coffcode.h (coff_set_section_contents): Don't write out sections without a filepos.
1993-02-12 * coffcode.h (coff_set_arch_mach_hook): *FIXME* the H8/300 is alwaysSteve Chamberlain1-0/+15
relaxable. Should be moved somewhere else.
1993-02-03Wed Feb 3 09:14:36 1993 Ian Lance Taylor (ian@cygnus.com)Ian Lance Taylor1-17/+2
* coffcode.h: Removed MIPS specific information, since coff-mips.c no longer includes this file.
1993-01-25Mon Jan 25 15:27:36 1993 Ian Lance Taylor (ian@cygnus.com)Ian Lance Taylor1-8/+9
* coffcode.h (_bfd_coff_mkobject_hook): Pass aouthdr argument. (coff_mkobject_hook): Accept aouthdr argument. * coffgen.c (coff_real_object_p): Pass aouthdr to mkobject_hook. Handle NULL aouthdr argument. (coff_object_p): If there is no aouthdr, pass it as NULL to coff_real_object_p. * libcoff.h: Rebuilt for mkobject_hook changes.
1993-01-12Mon Jan 11 18:32:22 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)Ian Lance Taylor1-0/+1
* targets.c (bfd_target): Added relocateable argument to _bfd_get_relocated_section_contents. Added _bfd_seclet_link target vector for linker use. * bfd.c (bfd_seclet_link): New macro. * bfd-in.h (JUMP_TABLE): Added _bfd_seclet_link. * seclet.c (rel, seclet_dump_seclet): Added relocateable argument and boolean return value. Made static. (bfd_generic_seclet_link): Renamed from seclet_dump. Added relocateable argument. * reloc.c (bfd_generic_get_relocated_section_contents): Added relocateable argument (if relocateable, saves relocs). * bout.c (b_out_get_relocated_section_contents), reloc16.c (bfd_coff_reloc16_get_relocated_section_contents): Added relocateable argument (if relocateable, just calls bfd_generic_get_relocated_section_contents). * libcoff-in.h (bfd_coff_reloc16_get_value): Added relocateable argument to prototype. * All targets: Set new _bfd_seclet_link vector to bfd_generic_seclet_link.
1993-01-10Use struct bfd_seclet * rather than bfd_seclet_type in prototypes toIan Lance Taylor1-1/+1
avoid requiring seclet.h before libcoff.h.
1993-01-08 * coffcode.h (sec_to_styp_flags): allow SEC_NEVER_LOAD to turn onSteve Chamberlain1-31/+54
STYP_NOLOAD bit. * coff-z8k.c: delete unused reloc functions
1993-01-08These changes cut the size of libbfd.a on a Sun4 by about 11%.Ian Lance Taylor1-2439/+283
Somewhat more could be done. Fri Jan 8 15:47:53 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * coffcode.h: Moved many generic functions into coffgen.c. Moved swapping functions into coffswap.h for ECOFF use. Moved relocation functions, only used by h8300 and z8k, into reloc16.c. Added hooks for coffgen.c functions to backend data structure, and added hook functions. Still more could be done. * coffswap.h: New file to hold COFF swapping routines. * coffgen.c: New file to hold generic COFF functions. * reloc16.c: New file to hold h8300 and z8k specific relocation functions. * libcoff-in.h: Added declarations for functions in coffgen.c. * libcoff.h: Rebuilt to incorporate changes. * coff-h8300.c: Function name changes. * coff-z8k.c: Function name changes. Use coff_reloc16_extra_cases hook rather than defining EXTRA_CASES. * Makefile.in: Build new files coffgen and reloc16. Added dependencies of coff-*.o on coffswap.h and seclet.h.
1992-12-22 * bfd-in.h: New macros bfd_asymbol_bfd and bfd_asymbol_flavour;Per Bothner1-6/+7
perhaps we can later remove the the_bfd field from each symbol. * syms.c (struct symbol_cache_entry): Remove unused field app_data. Add comment noting that the_bfd is almost redundant, but not quite. * aoutx.h, coff-a29k.c, coff-i386.c, coff-i960.c, coffcode.h: Use new macros bfd_asymbol_bfd and bfd_asymbol_flavour. * hppa.c (fill_spaces): Make slightly more rebust. * configure.in: Allow std-host as the "default" host.
1992-12-21Mon Dec 21 12:40:10 1992 Ian Lance Taylor (ian@cygnus.com)Ian Lance Taylor1-2/+5
* Patches from Minh Tran-le <mtranle@paris.intellicorp.com>. * configure.in (i386-*-isc*, i386-*-aix*): New targets. * configure.host (i386-*-isc*, i386-*-aix*): New hosts. * hosts/i386isc.h, config/i386isc.mh: New files for Interactive Unix. * hosts/i386aix.h, config/i386aix.mh: New files for AIX on PS/2. * aix386-core.c: New file for handling core files on AIX on PS/2. * targets.c: if AIX386_CORE, use aix386_core_vec. * coffcode.h (coff_real_object_p): check for I386SVMAGIC as well as I386MAGIC.
1992-12-04coffcode.h: bfd_coff_std_swap_table is now const and staticKen Raeburn1-3/+1
1992-12-03syms.c (asymbol): Added new field "app_data", for data particular to theKen Raeburn1-1/+113
application. Some of the linker flags ought to get moved to this field someday. archures.c (bfd_default_scan): Recognize a few more numbers: 80486, 80960, and 960. bfd-in.h, bfd.c, targets.c, coffcode.h, coff-mips.c, other targets: Moved COFF swap table to backend data. hosts/i386linux.h: Include unistd.h. aoutx.h, libaout.h, stab-syms.c: stab names are now in constant storage. trad-core.c: Fixed some `PARAMS' uses that were missing parentheses. aoutx.h, archive.c, archures.c, coffcode.h, ctor.c, reloc.c, syms.c: Doc fixes.
1992-11-28* aout-target.h, aoutf1.h, trad-core.c, coffcode.h, libaout.h:John Gilmore1-7/+7
Eliminate all PROTO calls, replace with PARAMS for readability. * aoutx.h: Add type to callback parameter. * coff-mips.c: Don't call trad-core.h, not needed. * trad-core.c: Incorporate trad-core.h declarations. Fix comments. * trad-core.h: Eliminate, unused.
1992-11-06Thu Nov 5 15:34:19 1992 Ian Lance Taylor (ian@cygnus.com)Ian Lance Taylor1-2/+14
* section.c: New section bit SEC_SHARED_LIBRARY. coffcode.h (styp_to_sec_flags): if STYP_NOLOAD && (STYP_TEXT || STYP_DATA), set SEC_SHARED_LIBRARY. This seems to be correct for i386-sysv.
1992-11-04(Duplicate change from p3.)Sean Eric Fagan1-6/+10
Only change coff auxent header fields when the circumstances require it. or at least warrant.
1992-10-28(coff_write_object_contents): Zero timestamp field.John Gilmore1-11/+1
1992-10-27Moved in from p3:Ian Lance Taylor1-9/+5
Tue Oct 27 12:24:34 1992 Ian Lance Taylor (ian@cygnus.com) * coffcode.h (coff_swap_aux_out): set the fcnary info before optionally setting the dimen info, since they are in the same memory locations. Also zero out external auxent. (coff_write_symbol): don't zero external auxent; now done in coff_swap_aux_out.
1992-10-23Fri Oct 23 10:32:36 1992 Steve Chamberlain (sac@thepub.cygnus.com)Steve Chamberlain1-6/+19
* seclet.c (rel): don't load sections without the SEC_LOAD bit. Thu Oct 15 10:16:35 1992 Steve Chamberlain (sac@thepub.cygnus.com) * coff-m68k.c (m68k_howto2type, SELECT_RELOC): new function to work out a coff relocation type from a howto's attributes rather than using the input r_type field. This fixes PR1677 and allows conversion of a.out relocs to coff relocs. * coffcode.h (coff_write_relocs): if supplied a relocation relative to an absolute symbol, use the right symbol index. * reloc.c (bfd_perform_relocation): do a partial link for coff relocs right.
1992-10-23Fri Oct 23 08:15:56 1992 Ian Lance Taylor (ian@cygnus.com)Ian Lance Taylor1-7/+54
* changes to support i386-sysv with shared libraries: * coffcode.h (sec_to_styp_flags): if TWO_DATA_SECS is defined, check for .data2; if _LIB is defined, check for it; map SEC_NEVER_LOAD to STYP_NOLOAD. (styp_to_sec_flags): map STYP_NOLOAD to SEC_NEVER_LOAD. (make_a_section_from_file): if TWO_DATA_SECS, accept .data2. (coff_write_object_contents): force vaddr of .lib to 0; set scnptr if section has contents, not just if it is loadable; if TWO_DATA_SECS, check for .data2 (coff_set_section_contents): set vma of .lib section to number of .lib sections. * coff-i386.c: define TWO_DATA_SECS; use a special CALC_ADDEND; don't define coff_write_armap to bsd_write_armap. * hosts/i386v.h: don't include <utime.h>, since it is not provided by SVR3.2.
1992-10-15* aout-adobe.c, aoutf1.h, aoutx.h, bout.c coff-m68k.c, coff-z8k.c,John Gilmore1-1/+0
coffcode.h, elf.c, libaout.h, libbfd.h, srec.c: Lint.
1992-10-15* aout-adobe.c, aoutf1.h, archive.c, bout.c, coff-rs6000.c,John Gilmore1-12/+3
coffcode.h, elf.c, ieee.c, libaout.h, libbfd.c, oasys.c, sco-core.c: Lint: Second argument of bfd_seek is always file_ptr. Third argument is SEEK_SET or SEEK_CUR. Result is always 0 or -1.
1992-09-29Tue Sep 29 08:30:21 1992 Ian Lance Taylor (ian@cygnus.com)Ian Lance Taylor1-13/+0
* Portability fixes from p3: coffcode.h (coff_write_relocs): removed sanity check until it works on all targets (per advice from sac). config/hp9000.mh: new file to define USG. hppa.c: #undef hppa before the JUMP_TABLE. hosts/hppahpux.h: #define NATIVE_HPPAHPUX_COMPILER if not __STDC__. targets.c (bfd_target_list): if NATIVE_HPPAHPUX_COMPILER, make local variable target volatile to avoid mysterious bug in HP9000/700 cc.
1992-09-26Lint; remove bcopy/bzero.John Gilmore1-3/+3
1992-09-25Fri Sep 25 11:11:57 1992 Steve Chamberlain (sac@thepub.cygnus.com)Steve Chamberlain1-3/+12
* coff-z8k.c: getting closer * coffcode.h (coff_get_relocated_section_contents): allow EXTRA_CASES hooks for different arches to provide different reloc types. * seclet.h: #ifndef around it to allow multiple inclusion * srec.c: minor doc fix
1992-09-11Fri Sep 11 15:37:06 1992 Ian Lance Taylor (ian@cygnus.com)Ian Lance Taylor1-5/+58
* coffcode.h (coff_renumber_symbols): set the last renumbered symbol pointer to NULL, as expected by coff_write_linenumbers. (coff_write_relocs): apparently a non-zero addend is OK for reloc type R_IHCONST used on the 29k.
1992-08-24 * coffcode.h (coff_add_missing_symbols): if symbols don't comeSteve Chamberlain1-15/+30
from a coff file (csym is null), dont deref them * ieee.c (parse_expression): get the answer right when adding an abs+(sec+off), (ieee_generic_stat_arch_elt): call ieee_object_p on elts so that filename is filled in.
1992-06-22Lint stuff which didn't make it last timeSteve Chamberlain1-2/+2
1992-06-22Fri Jun 19 20:23:21 1992 Steve Chamberlain (sac@thepub.cygnus.com)Steve Chamberlain1-14/+3
Lints for bfd_reloc_code_type->bfd_reloc_code_real_type, and correct calling of howto special functions and fixes from Raeburn for gas<>bfdness * archures.c: nuke bfd_reloc_code_type * bout.c, cpu-h8300.c, coff-i960.c, coff-m88k.c: special function lint * coffcode.h (styp_to_sec_flags): STYP_INFO is marked as SEC_NEVER_LOAD, various other bfdgas newness * reloc.c->libbfd.h: change protype of bfd_default_reloc_type_lookup * targets.c: change jump table vector to above