aboutsummaryrefslogtreecommitdiff
path: root/bfd/libbfd.h
AgeCommit message (Collapse)AuthorFilesLines
1998-02-05Do not allow BFD_ALIGN to wrapMichael Meissner1-3/+8
1998-01-28 * config.bfd, configure.in: Add dvp support.Doug Evans1-4/+4
* configure: Regenerate. * aclocal.m4: Regenerate. * archures.c, reloc.c, cpu-mips.c: Add dvp support. * bfd-in2.h, libbfd.h, libcoff.h: Regenerate. plus delete old txvu stuff, dvp generates mips files now
1998-01-20 * reloc.c (BFD_RELOC_TXVU_11_PCREL): New reloc.Doug Evans1-0/+4
* bfd-in2.h: Regenerate. * libbfd.h: Regenerate. * elf32-txvu.c (txvu_elf_howto_table): Add entry for it. (txvu_reloc_map): Likewise.
1997-12-23 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Declare.Ian Lance Taylor1-0/+12
* libbfd.h: Rebuild.
1997-09-30 * elf32-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMPDavid Edelsohn1-1/+2
renamed to R_SPARC_UNUSED_42. (sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry. * elf64-sparc.c (_bfd_sparc_elf_howto_table): R_SPARC_GLOB_JMP renamed to R_SPARC_UNUSED_42. (sparc_reloc_map): Delete R_SPARC_GLOB_JMP entry. * reloc.c (BFD_RELOC_SPARC_GLOB_JMP): Delete. * bfd-in2.h: Regenerated. * libbfd.h: Regenerated.
1997-09-16Add support for a 16 bit reloc against the TDA pointer!Nick Clifton1-0/+1
1997-09-15merge from d30v-970225-branchKen Raeburn1-0/+4
1997-09-03Removed v850 sanitization.Nick Clifton1-3/+1
Fixed v850e sanitization.
1997-09-03Removed BFD_RELOC_V850_PCREL.Nick Clifton1-1/+0
1997-09-02Switched over to using new reloc types.Nick Clifton1-3/+14
1997-08-15Remove ARC sanitization.David Edelsohn1-6/+2
1997-06-04Merged in changes made in armT-970328-branchNick Clifton1-0/+10
1997-03-25 * stabs.c (_bfd_link_section_stabs): Copy over the first headerIan Lance Taylor1-1/+1
symbol. Check for memory allocation failure of *psinfo. (_bfd_write_section_stabs): Add psinfo parameter. Change all callers. Set the value of the header symbol. * libbfd-in.h (_bfd_write_section_stabs): Update declaration. * libbfd.h: Rebuild.
1997-03-21Remove m32r sanitization.David Edelsohn1-8/+4
1997-03-17 * opncls.c (bfd_alloc_grow, bfd_alloc_finish): Remove.Ian Lance Taylor1-2/+0
* libbfd-in.h (bfd_alloc_grow, bfd_alloc_finish): Don't declare. * libbfd.h: Rebuild. * ieee.c (ieee_archive_p): Rewrite to not use bfd_alloc_grow. * sunos.c (sunos_add_dynamic_symbols): Likewise.
1997-03-17 * opncls.c (bfd_alloc): Rename from bfd_alloc_by_size_t. RemoveIan Lance Taylor1-2/+1
old version of bfd_alloc. * libbfd-in.h (bfd_alloc_by_size_t): Don't declare. * libbfd.h: Rebuild. * Several files: Call bfd_alloc rather than bfd_alloc_by_size_t.
1997-02-28 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Change _bfd_is_local_labelIan Lance Taylor1-3/+4
to _bfd_is_local_label_name. (bfd_target): Likewise. * syms.c (bfd_is_local_label): Define as function, not macro. (bfd_is_local_name): Define. * libbfd.c (bfd_generic_is_local_label_name): Rename from bfd_generic_is_local_label, and take a string rather than a symbol. * libbfd-in.h (_bfd_nosymbols_bfd_is_local_label): Don't define. (_bfd_nosymbols_bfd_is_local_label_name): Define. (bfd_generic_is_local_label): Don't declare. (bfd_generic_is_local_label_name): Declare. * bfd-in2.h, libbfd.h: Rebuild. * All backends: Change local_label to local_label_name.
1997-02-20Since d10v is public now, remove all sanitization statementsMichael Meissner1-2/+0
1997-02-19Tue Feb 18 17:22:59 1997 Martin M. Hunt <hunt@pizza.cygnus.com>Martin Hunt1-0/+11
* Makefile.in, archures.c, config.bfd, configure.in, elf.c, reloc.c, targets.c: New target, elf-*-D30V. * bfd-in2.h, configure, libbfd.h: Rebuilt. * cpu-d30v.c, elf32-d30v.c: New files.
1997-02-11 * elf32-mips.c (reloc_type): Add R_MIPS16_GPREL.Ian Lance Taylor1-0/+1
(elf_mips16_gprel_howto): New static variable. (mips16_gprel_reloc): New static function. (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_GPREL. (mips_info_to_howto_rel): Handle R_MIPS16_GPREL. (mips_elf_relocate_section): Handle R_MIPS16_GPREL. * reloc.c (BFD_RELOC_MIPS16_GPREL): Define. * bfd-in2.h, libbfd.h: Rebuild.
1997-01-27 * reloc.c: Add relocs BFD_RELOC_M32R_{HI16_[US]LO,LO16}.David Edelsohn1-0/+3
* bfd-in2.h, libbfd.h: Regenerated. * elf32-m32r.c: Add support for them.
1997-01-16update copyrightIan Lance Taylor1-5/+9
1996-10-17 * elf32-v850.c (enum reloc_type): Add R_V850_SDA_OFFSET,Jeff Law1-0/+3
R_V850_TDA_OFFSET and R_V850_ZDA_OFFSET. (elf_v850_howto_table): Corresponding changes. (elf_v850_reloc_map): Corresponding changes. * reloc.c: Add additional V850 relocations. * bfd-in2.h, libbfd.h: Rebuilt.
1996-10-14Mon Oct 14 11:17:24 1996 Richard Henderson <rth@tamu.edu>Ian Lance Taylor1-0/+13
* reloc.c: Create a new BFD_RELOC_ALPHA_ELF_LITERAL. It was a mistake to have reused the ECOFF LITERAL for ELF since they have different semantics. * elf64-alpha.c (elf_reloc_map): Map from ELF_LITERAL. * bfd-in2.h, libbfd.h: Rebuild. * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Trap .got section overflow. * elf64-alpha.c (elf64_alpha_relocate_section): Do not emit a dynamic relocation for an undefweak symbol when we are building a static executable.
1996-08-30 Add SH ELF support.Ian Lance Taylor1-0/+30
* elf32-sh.c: New file. * elf.c (prep_headers): Handle bfd_arch_sh. * elfcode.h (write_relocs): Handle absolute symbol. * elf-bfd.h (_bfd_elf32_link_read_relocs): Declare. (_bfd_elf64_link_read_relocs): Declare. * elflink.h (NAME(_bfd_elf,link_read_relocs)): Rename from elf_link_read_relocs. Make globally visible. Change all callers. (elf_link_input_bfd): Get external symbols from cache in symtab_hdr->contents. Get contents from cache in elf_section_data. * elfxx-target.h (bfD_elfNN_bfd_relax_section): Only define if not already defined. * reloc.c: Define BFD_RELOC_SH_* relocs. * libbfd-in.h (_bfd_sh_align_load_span): Declare. * coff-sh.c (sh_insns_conflict): Fix a return value. (_bfd_sh_align_load_span): New globally visible function, broken out of sh_align_load. (sh_align_load): Call _bfd_sh_align_load_span. (sh_swap_insns): Change relocs parameter to PTR. * bfd-in2.h, libbfd.h: Rebuild. * targets.c (bfd_elf32_sh_vec): Declare. (bfd_elf32_shl_vec): Declare. * config.bfd (sh-*-elf*): New target. * configure.in (bfd_elf32_sh_vec): New target vector. (bfd_elf32_shl_vec): New target vector. * configure: Rebuild. * Makefile.in: Rebuild dependencies. (BFD32_BACKENDS): Add elf32-sh.o. (BFD32_BACKENDS_CFILES): Add elf32-sh.c. * elf.c (map_sections_to_segments): Check that LMA does not skip a page before checking D_PAGED.
1996-08-08Thu Aug 8 12:21:56 1996 Klaus Kaempf <kkaempf@progis.de>Ian Lance Taylor1-3/+0
* evax-alpha.c (evax_alpha_vec): Corrected flags, cleanup. (evax_initialize): Remove evax_reloc_table. (evax_close_and_cleanup): Ditto. (reloc_nil): Ditto. (alpha_howto_table): Remove ALPHA_R_SWREL32 and ALPHA_R_SWREL64 entries. (evax_bfd_reloc_type_lookup): Ditto. * evax-egsd.c (_bfd_evax_slurp_egsd): Add a few casts; set cooked_size == raw_size. * evax-emh.c (_bfd_evax_register_filename): Remove. * evax-etir.c (etir_stc): Allow ETIR_S_C_STC_xx commands. * evax-misc.c (add_new_contents): Malloc section at full size. (_bfd_save_evax_section): Memcpy section contents directly. * evax.h (ALPHA_R_SWREL32, ALPHA_R_SWREL64): Remove. (evax_reloc_table): Remove. * hosts/alphavms.h (O_ACCMODE): Define if needed. * makefile.vms: Add better support for DEC C compilation Add evax.h dependencies * reloc.c (bfd_get_reloc_size): Add case for 16 byte reloc. (BFD_RELOC_SWREL32,BFD_RELOC_SWREL64): Remove. (BFD_RELOC_ALPHA_BASEREG): Remove. * bfd-in2.h, libbfd.h: Rebuild.
1996-07-31Wed Jul 31 15:00:12 1996 James G. Smith <jsmith@cygnus.co.uk>Jackie Smith Cashion1-0/+2
* reloc.c: (BFD_RELOC_ARM_OFFSETIMM8, BFD_RELOC_ARM_HWLITERAL): Added, for internal use by the ARM gas. * libbfd.h: Rebuilt * bfd-in2.h: Rebuilt
1996-07-19rebuildIan Lance Taylor1-1/+1
1996-07-18start-sanitize-d10vMartin Hunt1-9/+27
Wed Jul 17 14:51:52 1996 Martin M. Hunt <hunt@pizza.cygnus.com> * Makefile.in (ALL_MACHINES): Add cpu-d10v.o (BFD32_BACKENDS) Add elf32-d10v.o * archures.c: Add bfd_d10v_arch. * bfd-in2.h: Add bfd_d10v_arch. * config.bfd (d10v-*-*): New target. * configure: (bfd_elf32_d10v_vec) New vector. * configure.in: (bfd_elf32_d10v_vec) New vector. * cpu-d10v.c: New file. * elf.c (prep_headers): Added case bfd_arch_d10v. * elf32-d10v.c: New file. * libbfd.h: Rebuild. * reloc.c (BFD_RELOC_D10V_10_PCREL_R, BFD_RELOC_D10V_10_PCREL_L, BFD_RELOC_D10V_18, BFD_RELOC_D10V_18_PCREL): Define. * targets.c (bfd_elf32_d10v_vec): New vector. end-sanitize-d10v
1996-04-01 * linker.c (_bfd_generic_link_hash_newfunc): Renamed fromJeff Law1-5/+0
generic_link_hash_newfunc. All references changed. * genlink.h (_bfd_generic_link_hash_newfunc): Declaration moved here from libbfd-in.h. * libbfd-in.h: Corresponding changes. * libbfd.h: Regenerated. Minor changes suggested by Ian.
1996-03-29 * libbfd-in.h (generic_link_hash_newfunc): Add declaration.Jeff Law1-0/+10
* libbfd.h: Rebuilt. * linker.c (generic_link_hash_newfunc): No longer static. * coffcode.h (coff_bfd_link_hash_create): Allow specific targets to override. * coff-h8300.c: Add two derived hash tables and their associated funtions and #defines for use by the h8300 linker. (h8300_reloc16_extra_cases, case R_MEM_INDIRECT): Create entries in the function vector as needed. Place the address of the function vector entry in the location specified by the R_MEM_INDIRECT reloc. Rewrite the vectors section contents as necessary. (h8300_bfd_link_add_symbols): New function for the h8300 linker. (coff_bfd_link_add_symbols): Define to use h8300 specific version. (coff_bfd_link_hash_table_create): Likewise. Linker changes for function vectors. HMSE.
1996-02-14Add reloc.c entries MIPS_CALL_HI16/MIPS_CALL_LO16.Ian Lance Taylor1-0/+2
1996-02-13 * reloc.c (BFD_RELOC_MIPS_GOT_HI16): Define.Ian Lance Taylor1-1/+26
(BFD_RELOC_MIPS_GOT_LO16): Define. * bfd-in2.h, libbfd.h: Rebuild. * elf32-mips.c (mips_reloc_map): Map new relocs.
1996-01-11Add support for SHT_ORDERED and SHF_EXCLUDEMichael Meissner1-1/+1
1996-01-09Tue Jan 9 15:22:53 1996 David Mosberger-Tang <davidm@azstarnet.com>Ian Lance Taylor1-6/+29
* coff-alpha.c (alpha_relocate_section): During final link, allow output .lita section to be bigger than 64k by adjusting gp value on a per-input section basis. * libecoff.h (struct ecoff_tdata): Add issued_multiple_gp_warning field. (struct ecoff_section_tdata): Add gp field. Tue Jan 9 12:00:36 1996 Ian Lance Taylor <ian@cygnus.com> Handle Alpha ECOFF changes in OSF/1 3.2. * libecoff.h (struct ecoff_backend_data): Add get_elt_at_filepos field. * coff-alpha.c: Include "aout/ar.h". (alpha_ecoff_get_relocated_section_contents): Don't require an ALPHA_R_IGNORE reloc after an ALPHA_R_GPDISP reloc, since OSF/1 3.2 doesn't generate one. (alpha_relocate_section): Likewise. (alpha_ecoff_slurp_armap): Define. (alpha_ecoff_slurp_extended_name_table): Define. (alpha_ecoff_construct_extended_name_table): Define. (alpha_ecoff_truncate_arname): Define. (alpha_ecoff_write_armap): Define. (alpha_ecoff_generic_stat_arch_elt): Define. (alpha_ecoff_update_armap_timestamp): Define. (ARFZMAG): Define. (alpha_ecoff_read_ar_hdr): New static function. (alpha_ecoff_get_elt_at_filepos): New static function. (alpha_ecoff_openr_next_archived_file): New static function. (alpha_ecoff_get_elt_at_index): New static function. (alpha_ecoff_backend_data): Initialize get_elt_at_filepos field. (ecoffalpha_little_vec): Change BFD_JUMP_TABLE_ARCHIVE from _bfd_ecoff to alpha_ecoff. * ecoff.c (ecoff_link_add_archive_symbols): Use get_elt_at_filepos field from backend structure, rather than always calling _bfd_get_elt_at_filepos. * coff-mips.c (mips_ecoff_backend_data): Initialize get_elt_at_filepos field. * archive.c (_bfd_generic_read_ar_hdr_mag): New function, copied from _bfd_generic_read_ar_hdr with minor changes. (_bfd_generic_read_ar_hdr): Use _bfd_generic_read_ar_hdr_mag. * libbfd-in.h (_bfd_generic_read_ar_hdr_mag): Declare. * libbfd.h: Rebuild. * bfd-in.h (BFD_IN_MEMORY): Define. * libbfd-in.h (struct bfd_in_memory): Define. * libbfd.c (bfd_read): Handle BFD_IN_MEMORY flag. (bfd_get_file_window): Don't try to map a BFD_IN_MEMORY file. (bfd_write, bfd_stat): Abort if BFD_IN_MEMORY is set. (bfd_tell, bfd_flush, bfd_seek): Handle BFD_IN_MEMORY flag. * bfd.c (struct _bfd): Change iostream field from char * to PTR. (bfd_get_size): Handle BFD_IN_MEMORY flag. * cache.c (bfd_cache_close): Ignore BFD_IN_MEMORY files. (bfd_open_file): Cast to PTR, not char *, when setting iostream. (bfd_cache_lookup_worker): Abort if BFD_IN_MEMORY is set. * opncls.c (bfd_fdopenr): Cast to PTR, not char *, when setting iostream. (bfd_openstreamr): Likewise. * aoutx.h (NAME(aout,some_aout_object_p)): Only fstat iostream if BFD_IN_MEMORY is not set. * riscix.c (riscix_some_aout_object_p): Likewise. * bfd-in2.h, libbfd.h: Rebuild. * targets.c (bfd_target): Add _bfd_get_elt_at_index field. (BFD_JUMP_TABLE_ARCHIVE): Add _get_elt_at_index. (bfd_get_elt_at_index): Define. * archive.c (_bfd_generic_get_elt_at_index): Rename from bfd_get_elt_at_index. Change index parameter from int to symindex. * libbfd-in.h (_bfd_generic_get_elt_at_index): Declare. (_bfd_noarchive_get_elt_at_index): Define. (_bfd_archive_bsd_get_elt_at_index): Define. (_bfd_archive_coff_get_elt_at_index): Define. * bfd-in2.h, libbfd.h: Rebuild. * aout-target.h (MY_get_elt_at_index): Define if not defined. * coff-rs6000.c (xcoff_get_elt_at_index): Define. * ieee.c (ieee_get_elt_at_index): Define. * libecoff.h (_bfd_ecoff_get_elt_at_index): Define. * oasys.c (oasys_get_elt_at_index): Define. * som.c (som_get_elt_at_index): Define.
1995-10-06 * targets.c (bfd_target): Add _bfd_read_ar_hdr field. ModifyIan Lance Taylor1-2/+9
BFD_JUMP_TABLE_ARCHIVE accordingly. * libbfd-in.h (_bfd_snarf_ar_hdr): Don't declare. (_bfd_compute_and_write_armap): Declare. (_bfd_generic_read_ar_hdr): Declare. (_bfd_read_ar_hdr): Define. (_bfd_noarchive_read_ar_hdr): Define. (_bfd_archive_bsd_read_ar_hdr): Define. (_bfd_archive_coff_read_ar_hdr): Define. * archive.c: Change all callers of _bfd_snarf_ar_hdr to call _bfd_read_ar_hdr instead. (_bfd_generic_read_ar_hdr): Rename from _bfd_snarf_ar_hdr. (_bfd_compute_and_write_armap): Rename from compute_and_write_armap. Make non-static. Change all callers. * ecoff.c (_bfd_ecoff_slurp_armap): Call _bfd_read_ar_hdr rather than _bfd_snarf_ar_hdr. * aout-target.h (MY_read_ar_hdr): Define if not defined. * ieee.c (ieee_read_ar_hdr): Define. * libecoff.h (_bfd_ecoff_read_ar_hdr): Define. * oasys.c (oasys_read_ar_hdr): Define. * som.c (som_read_ar_hdr): Define. * bfd-in2.h, libbfd.h: Rebuild.
1995-09-25 * init.c (initialized): Remove static variable.Ian Lance Taylor1-3/+0
(bfd_init): Don't bother setting initialized. (bfd_check_init): Remove. * opncls.c (_bfd_new_bfd): Don't call bfd_check_init. * libbfd.h: Rebuild.
1995-09-22 Change arch info to be const, initialized at compile time.Ian Lance Taylor1-11/+5
* archures.c: Reindent many functions. Change CONST to const. (bfd_arch_info_type): Make arch_name const. Remove disassemble; nothing set it anyhow. Make next const. (bfd_arch_info_list): Remove. (bfd_archures_list): Rename from archures_init_table. Change from a table of function pointers to a table of bfd_arch_info_type structure addresses. (bfd_scan_arch): Rewrite accordingly. Return a const pointer. (bfd_lookup_arch): Likewise. (bfd_set_arch_info): Rewrite accordingly. Change argument to be a const pointer. (bfd_default_arch_struct): Make const. (bfd_arch_init, bfd_arch_linkin): Remove. (bfd_get_arch_info): Return a const pointer. * init.c (bfd_init): Don't call bfd_arch_init. * bfd.c (struct _bfd): Make arch_info const. * bfd-in2.h: Rebuild. * libbfd.h: Rebuild. * configure.in: Put & before everything in $selarchs. * configure: Rebuild. * cpu-*.c: Change bfd_*_arch from a function which calls bfd_arch_linkin to a const structure. * ieee.c (ieee_object_p): Make arch const.
1995-09-22Start work to all full PowerPC V.4 reloc support.Michael Meissner1-3/+26
1995-08-31Thu Aug 31 16:00:53 1995 steve chamberlain <sac@slash.cygnus.com>Steve Chamberlain1-4/+63
* Makefile.in: Update dependencies. * aout-target.h (MY_bfd_print_private_bfd_data): New. * bfd-in.h (PE STUFF): Deleted. * bfd.c (tdata->pe_obj_data): New. (bfd_print_private_bfd_data): New. * coff-i386.c, coff-arm.c (coff_*-rtype_to_howto): Get image base from new place. * libcoff.h, libbfd.h, bfd-in2.h: Rebuilt. * coffcode.h (pe_value): Delete (coff_mkobject, coff_mkobject_hook): Conditionally build. (coff_compute_section_file_positions): Look in new place. (add_data_entry, fill_pe_header_info): Deleted. (coff_write_object_contents): Remove PE stuff. (coff_bfd_print_private_bfd_data): New. * coffswap.h: Remove PE stuff. * elfxx-target.h (bfd_elfNN_bfd_print_private_bfd_data): New. * libbfd-in.h (_bfd_generic_bfd_print_private_bfd_data): New. * libcoff-in.h (pe_data_type): New. * libecoff.h (_bfd_ecoff_bfd_print_private_bfd_data): New. * targets.c (_bfd_print_private_bfd_data): New. * peicode.h: New file.
1995-01-12Change "reloc_howto_type" typedef to be "const", since all uses of it are (orKen Raeburn1-3/+7
should be) anyways.
1994-11-17* reloc.c (bfd_reloc_code_type): Add new value BFD_RELOC_12_PCREL.Ken Raeburn1-10/+17
* bfd-in2.h, libbfd.h: Rebuilt.
1994-09-02* reloc.c (enum bfd_reloc_code_real): Rewrote definition to use new "chew"Ken Raeburn1-0/+102
commands for simultaneous definition of enumerator and enumerator name table. (bfd_get_reloc_code_name): New function, for retrieving a symbolic name associated with an enumerator. * libbfd.h, bfd-in2.h: Regenerated.
1994-08-22 * hash.c: Copy string hash functions from aoutx.h.Ian Lance Taylor1-18/+27
* aoutx.h: String hash functions moved to hash.c. Retain simplified versions of add_to_stringtab and emit_stringtab. Change all callers to use new function and structure names. * libbfd-in.h (_bfd_stringtab_init, _bfd_stringtab_free): Declare. (_bfd_stringtab_size, _bfd_stringtab_add): Declare. (_bfd_stringtab_emit): Declare. * libbfd.h: Rebuilt.
1994-06-03 * libbfd.h (bfd_realloc): Change last arg to "size_t size".Jeff Law1-2/+16
1994-04-06 * targets.c (bfd_target): Rearranged fields in target vector.Ian Lance Taylor1-15/+141
Removed _bfd_debug_info_start, _bfd_debug_info_end and _bfd_debug_info_accumulate, which were never used. (BFD_JUMP_TABLE_GENERIC, BFD_JUMP_TABLE_COPY): Defined. (BFD_JUMP_TABLE_CORE, BFD_JUMP_TABLE_ARCHIVE): Defined. (BFD_JUMP_TABLE_SYMBOLS, BFD_JUMP_TABLE_RELOCS): Defined. (BFD_JUMP_TABLE_WRITE, BFD_JUMP_TABLE_LINK): Defined. * All backends: Changed to use the new BFD_JUMP_TABLE_* macros rather than the single JUMP_TABLE macro. Removed many of the weird macro definitions needed to support the monolithic JUMP_TABLE. * bfd-in.h (JUMP_TABLE): Removed. * libbfd-in.h: Define a bunch of macros, and declare a few functions, for use with the new BFD_JUMP_TABLE_* macros. * libbfd.c (_bfd_dummy_new_section_hook): Removed. (bfd_false): Set bfd_error_invalid_operation. (bfd_nullvoidptr): Likewise. (bfd_n1): New function. (_bfd_nocore_core_file_matches_executable_p): Renamed from _bfd_dummy_core_file_matches_executable_p. (_bfd_nocore_core_file_failing_command): Similar rename. Set bfd_error_invalid_operation. (_bfd_nocore_core_file_failing_signal): Likewise. (_bfd_generic_get_section_contents): Renamed from bfd_generic_get_section_contents. Changed all callers. (_bfd_generic_set_section_contents): Similar rename. * ieee.c: #if 0 out ieee_bfd_debug_info_start, ieee_bfd_debug_info_end, ieee_bfd_debug_info_accumulate. They were never called. * bfd-in2.h: Rebuilt. * libbfd.h: Rebuilt.
1994-03-30Wed Mar 30 16:25:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)Ian Lance Taylor1-1/+2
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-22 * linker.c (_bfd_generic_final_link): Set reloc_count to 0 beforeIan Lance Taylor1-0/+6
counting relocs. Set SEC_RELOC flag for any section which has relocs. * linker.c (_bfd_default_link_order): Handle bfd_data_link_order. * linker.c (_bfd_generic_link_add_symbols): Just call generic_link_add_symbols. (_bfd_generic_link_add_symbols_collect): New function, like _bfd_generic_link_add_symbols but also collect constructors and destructors by name as collect2 does. (generic_link_add_symbols): New function, like old _bfd_generic_link_add_symbols but with collect argument. (generic_link_add_object_symbols): Take collect argument. (generic_link_check_archive_element_no_collect): New function. (generic_link_check_archive_element_collect): New function. (generic_link_check_archive_element): Take collect argument. (generic_link_add_symbol_list): Take collect argument. (_bfd_generic_link_add_one_symbol): Rename constructor argument to collect. * libbfd-in.h (_bfd_generic_link_add_symbols_collect): Declare. * libbfd.h: Rebuilt.
1994-03-22 Support for link_order types which generate relocs in order toIan Lance Taylor1-2/+14
support -Ur in the linker. * linker.c (generic_link_add_symbol_list): Remove bitsize argument from call to _bfd_generic_link_add_one_symbol. (_bfd_generic_link_add_one_symbol): Remove bitsize argument. Don't pass bitsize to constructor call back. Pass BFD_RELOC_CTOR instead of bitsize to add_to_set call back. (_bfd_generic_final_link): Account for link_order relocs when allocating space for relocations. Handle them in link_order loop. (_bfd_generic_reloc_link_order): New function. (_bfd_default_link_order): If a reloc_link_order is seen here, abort. (_bfd_count_link_order_relocs): New function. * libbfd-in.h (_bfd_generic_link_add_one_symbol): Remove bitsize argument from declaration. (_bfd_generic_reloc_link_order): Declare. (_bfd_count_link_order_relocs): Declare. * libbfd.h: Rebuilt. * aoutx.h (aout_link_add_symbols): Remove bitsize argument from call to _bfd_generic_link_add_one_symbol. (NAME(aout,final_link)): Account for link_order relocs when allocating space for relocations. Handle them after handling all input BFDs. (aout_link_reloc_link_order): New function. * ecoff.c (ecoff_link_add_externals): Remove bitsize argument from call to _bfd_generic_link_add_one_symbol. (ecoff_bfd_final_link): Account for link_order relocs when allocating space for relocations. Handle them in link_order loop. (ecoff_link_write_external): Set the storage class of a defined linker created symbol based on the section it is in. Correct bfd_link_hash_weak case to use .sc rather than .st. (ecoff_reloc_link_order): New function. * coff-alpha.c (alpha_bfd_reloc_type_lookup): Handle BFD_RELOC_CTOR. * coff-mips.c (mips_bfd_reloc_type_lookup): Likewise.
1994-03-15 * Most files:David MacKenzie1-2/+1
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.