aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd.c
AgeCommit message (Collapse)AuthorFilesLines
1994-10-13 * bfd.c (bfd_scan_vma): Pass end argument on to strtoul.Ian Lance Taylor1-2/+17
1994-04-01 * targets.c (bfd_target): Add _bfd_free_cached_info field.Ian Lance Taylor1-0/+3
* 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-30Wed Mar 30 16:25:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)Ian Lance Taylor1-11/+33
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-02-25 * bfd.c (bfd_get_gp_size): Can't return gp value on an archive.Ian Lance Taylor1-47/+155
(bfd_set_gp_size): Can't set gp value on an archive.
1994-01-21 * bfd.c: Remove error strings for errors removed below.David MacKenzie1-2/+0
1994-01-21 * bfd.c (bfd_get_gp_size): Added support for ELF.Ian Lance Taylor1-86/+37
1993-11-05fix mistakes in last changeDavid MacKenzie1-0/+96
1993-11-05doc cleanupDavid MacKenzie1-151/+52
1993-11-04* bfd-in.h (bfd_get_cacheable, bfd_set_cacheable): New accessors.John Gilmore1-11/+85
* bfd.c, opncls.c: Improve comments on file descriptor cacheing.
1993-08-04With these changes, the binutils mostly work on the Alpha, except forIan Lance Taylor1-0/+1
objdump -r. * coffswap.h: Added macros used when accessing several fields; default is the same as before. (coff_swap_aouthdr_{in,out}): Handle the Alpha ECOFF fields. * coff-alpha.c: Defined macros to use the right sizes in coffswap.h. * libecoff.h: Backend information is now in target vector, not BFD. Start of backend information is COFF backend information. * coff-alpha.c, coff-mips.c: Changed accordingly. * ecoff.c (ecoff_mkobject): New function. (ARMAP_START): Changed into backend information, since Alpha uses a different name. (ecoff_slurp_armap): Don't overlay archive header. * bfd.c: Include libcoff.h.
1993-08-03 * ecoff.c: New file for generic ECOFF functions.Ian Lance Taylor1-10/+12
* ecoffswap.h: New file for ECOFF swapping functions which differ only slightly for different targets. * libecoff.h: Added prototypes for ecoff.c functions. (ecoff_backend_data): New structure. (ecoff_tdata): Added backend_data field. Changed external data pointers to be PTR rather than to a particular struct. (ecoff_symbol_struct): Moved in from coff-mips.c. * coff-alpha.c, coff-mips.c: Moved common functions into ecoff.c. Added ECOFF backend structures. Include ecoffswap.h. * coff-msym.c: Removed; superseded by ecoffswap.h. * bfd.c: Include coff/internal.h. * Makefile.in (BFD_LIBS): Removed coff-mips.o and coff-msym.o. Added ecoff.o. (BFD64_BACKENDS): Added coff-alpha.o. (CFILES): Removed coff-msym.c. Added ecoff.c. (bfd.o): Added dependency on $(INCDIR)/coff/sym.h. (coff-mips.o): Added dependency on ecoffswap.h and coff/ecoff.h. (ecoff.o, coff-alpha.o): New targets. (coff-msym.o): Removed target.
1993-07-22 * hpux-core.c: New file; backend for HP/UX style core files.Ian Lance Taylor1-1/+1
* bfd.c (struct _bfd): Renamed hppa_core_data field to hpux_core_data. * bfd-in2.h: Updated. * hppa.c (make_bfd_asection, hppa_core_file_p, hppa_core_file_failing_command, hppa_core_file_failing_signal, hppa_core_file_matches_executable_p): Moved into hpux-core.c. Removed from target vector. * libhppa.h (struct hppa_core_struct and accessor macros): Moved into hpux-core.c. * targets.c: If HPUX_CORE is defined, add hpux_core_vec to target list. * config/hp300.mh (HDEFINES): Set to -DHPUX_CORE. (HDEPFILES): Set to hpux-core.o. * config/hppabsd.mh, config/hppahpux.mh: Likewise. * hosts/hp300.h (HOST_HP300HPUX): Define. * Makefile.in (OPTIONAL_BACKENDS): Added sco-core.o, aix386-core.o, hpux-core.o. (sco-core.o, aix386-core.o, hpux-core.o): New dependencies.
1993-07-20 * bfd.c (union tdata): Add nlm_obj_data;Fred Fish1-0/+1
* targets.c (enum target_flavour): Add bfd_target_nlm_flavour.
1993-07-06Stricter prototyping, to force type conversions between 64-bit target andKen Raeburn1-5/+6
32-bit host values. * libbfd.c (bfd_xmalloc_by_size_t): New function. * opncls.c (bfd_cache_init, bfd_open_file): Add prototypes to declarations. (obstack_chunk_alloc): Use bfd_xmalloc_by_size_t. (new_bfd): Prototype-style definition, using DEFUN. (bfd_alloc_grow, bfd_alloc, bfd_zalloc, bfd_realloc): Size argument is type size_t, not bfd_size_type. * ieee.c (obstack_chunk_alloc): Use bfd_xmalloc_by_size_t. * bfd.c (bfd_default_error_trap, bfd_error_trap, bfd_error_nonrepresentabltrap): Prototypes. * libbfd-in.h (bfd_alloc, bfd_zalloc, bfd_realloc, bfd_alloc_grow): Adjusted prototypes for arg type change. * archive.c (get_elt_at_filepos, do_slurp_bsd_armap, normalize, do_slurp_coff_armap, bfd_construct_extended_name_table): Prototypes.
1993-04-15Thu Apr 15 09:09:18 1993 Jim Kingdon (kingdon@cygnus.com)Jim Kingdon1-10/+55
* bfd-in.h (bfd_error), bfd.c (bfd_errmsgs): Add file_truncated. * format.c (bfd_check_error): Check error return from _bfd_check_format routines. Wed Apr 14 23:48:25 1993 Jim Kingdon (kingdon@cygnus.com) * rs6000-core.c (rs6000coff_core_p): Improve error checking and recognize .data section if present.
1993-01-08Basically a checkpoint.Ian Lance Taylor1-0/+48
Fri Jan 8 15:47:53 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * bfd.c (struct _bfd): Added ecoff_tdata to tdata union. * targets.c (enum target_flavour): Added bfd_target_ecoff_flavour. * coff-msym.c: Use DEFUN for function definitons. * coff-mips.c: Added code to read and print symbols, and to find line numbers.
1992-12-22* bfd.c: Add struct hppa_core_data to tdata union.Stu Grossman1-0/+1
1992-12-17* bfd.c: Use right name for tekhex tdata struct.John Gilmore1-49/+23
* tekhex.c: Insert leading_char (0) into bfd_target struct. Style. * libcoff.h: Updated to get spacing change from coffcode.h. * trad-core.c: leading_char is 0 (no symbols!), not '_'.
1992-01-28* trad-core.c, bfd.c, ../include/bfd.h: Various fixes for PMAXStu Grossman1-0/+1
core reading.
1992-01-28 New entry point in the transfer vector - bfd_relax_section.Steve Chamberlain1-0/+4
* aout-target.h: add to vector, call generic_relax * bfd-in.h: add to vector * bfd.c: add #define for vector * bout.c: add to vector, call generic_relax * coffcode.h: add to vector, also now has coff specific relax code for the relaxable H8/300 relocs. Also clean up abs section cruft. * elf.c: call generic_relax * ieee.c: call new vector, clean up some bugs due to the creation of bfd_abs_section * libbfd.h: add bfd_generic_relax_section EXFUN * oasys.c: call generic_relax * reloc.c: implement generic_relax * seclet.c: moved much of this into coffcode.h * srec.c: call generic_relax * targets.c: define new transfer vector
1992-01-24Uses the new small reloc type now.Steve Chamberlain1-144/+262
Currently self hosts on sun4 and sun3
1991-11-30Even more documentationSteve Chamberlain1-150/+163
1991-11-22const lintJohn Gilmore1-12/+11
1991-10-25RS/6000 support, by Metin G. Ozisik, Mimi Phûông-Thåo Võ, and John Gilmore.John Gilmore1-0/+23
1991-10-11Include bfd.h before sysdep.h, so ansidecl and PROTO() get defined first.John Gilmore1-21/+9
1991-09-19*** empty log message ***Sean Eric Fagan1-8/+9
1991-08-19Fixed minor typos.Roland Pesch1-9/+10
1991-08-19Mon Aug 19 13:48:22 1991 Roland H. Pesch (pesch at cygint.cygnus.com)Roland Pesch1-21/+23
* aoutx.h, archive.c, archures.c, bfd.c, bfd.texinfo, cache.c, coffcode.h, core.c, format.c, libbfd.c, libbfd.h, libcoff.h, opncls.c, reloc.c, section.c, syms.c, targets.c (documentation segments): used BFD (caps) more consistently as a name in discourse, fixed a few other minor typos and uses of fonts
1991-07-16Added #define for special gdb coff entry pointsSteve Chamberlain1-0/+9
1991-07-15* aoutf1.h archive.c bfd.c coffcode.h core.c ecoff.c ieee.cSteve Chamberlain1-1/+1
bfd.texinfo oasys.c opncls.c reloc.c srec.c: More documentation on lint fixes. * amdcoff.c bfd.texinfo Makefile.in : Folded in changes for amd 29k coff by David Wood (wood@lab.ultra.nyu.edu).
1991-07-04Now full of documentation. Yum Yum.Steve Chamberlain1-726/+221
1991-05-29Merge in changes from gdb-3.95 release into mainstream of BFD development.John Gilmore1-26/+38
Support defaulted (search all) targets and specific (only check one) targets.
1991-05-21*** empty log message ***Steve Chamberlain1-50/+53
1991-05-04Saber C cleanup. Fix horrid bug in opncls.c in which an obstack isJohn Gilmore1-7/+0
initialized on the stack and then copied into its own allocated space. (Wow, Steve, you're twisted...)
1991-05-02Merge devo/bfd with GDB's bfd.John Gilmore1-47/+24
Remove obstack.h to ../include and obstack.c to ../libiberty. Move COFF symbol swapping code to coffswap.c where GDB can call it but it won't be duplicated if we have N different COFF targets. Add support for traditional Unix core files (with a upage). This support is from an Ultrix port, but is probably slightly broken now. Improve bfd_release's of obstack'd items on error returns. gcc -Wall fixes. Handle section alignment slightly better in coff, and comment where it needs more work (on page-aligning virtual vs file addresses for DPAGED). Use set_tdata everywhere that tdata is set, to avoid "cast to the left of assignment" problems with some compilers. Move bfd_alloc, bfd_zalloc, bfd_realloc, and bfd_release into libbfd.h (from bfd.h) since they are internal routines. Remove the redundant suffix "_struct" from struct tags. Set symbol count early in file reading, before slurping in the syms, for GDB's use.
1991-04-24Changed the shape of the howto type yet again.Steve Chamberlain1-1/+12
Now m88kbcs support can self host.
1991-04-23*** empty log message ***Steve Chamberlain1-6/+6
1991-04-17Cosmetic changes to bfd_perform_relocationSteve Chamberlain1-98/+111
1991-04-15Merged in some changes from Intel,Steve Chamberlain1-104/+146
Added some more prototypes.
1991-03-21Initial revisionDavid Henkel-Wallace1-0/+882