aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
1994-04-06Tue Apr 5 17:54:07 1994 Stan Shebs (shebs@andros.cygnus.com)Stan Shebs2-0/+8
* hosts/mpw.h (CLOSE_BEFORE_UNLINK): Define.
1994-04-06Tue Apr 5 17:48:52 1994 Stan Shebs (shebs@andros.cygnus.com)Stan Shebs1-0/+5
* i386lynx.c, sparclynx.c (NAME): Remove embedded whitespace in macro uses, confuses some non-ANSI compilers.
1994-04-05 * som.c (som_bfd_free_cached_info): Add missing PARAMS decl.Jeff Law2-1/+11
Don't free anything if we don't have a bfd_object. (som_close_and_cleanup): Call som_bfd_free_cached_info.
1994-04-05 * elf32-mips.c (mips_elf_final_link): Don't remove empty sections.Ian Lance Taylor1-0/+6
It turns out not to be required on Irix 5, and it causes problems if the sections happen to contain symbols.
1994-04-05 * elfcode.h (write_shdrs_and_ehdr): Correct bfd_write check.Ian Lance Taylor1-1/+1
1994-04-05 * aoutx.h (NAME(aout,canonicalize_reloc)): Don't error out ifIan Lance Taylor11-26/+26
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 * aoutx.h (NAME(aout,bfd_free_cached_info)): Don't free anythingIan Lance Taylor2-0/+6
if we don't have a bfd_object.
1994-04-04 Made sure that every call to bfd_read, bfd_write, and bfd_seekIan Lance Taylor22-369/+429
checks the return value and handled bfd_error correctly. These changes are not itemised.
1994-04-04 Made sure that every call to bfd_read, bfd_write, and bfd_seekIan Lance Taylor1-35/+64
checks the return value and handled bfd_error correctly. These changes are not itemised. Also: * srec.c (srec_write_record): Change return type to boolean. (srec_write_header): Likewise. Also, check srec_write_record return value. (srec_write_section, srec_write_terminator): Likewise. (srec_write_symbols): Change return type to boolean. (internal_srec_write_object_contents): Check return value of srec_write_symbols, srec_write_header, srec_write_section, and srec_write_terminator.
1994-04-04 Made sure that every call to bfd_read, bfd_write, and bfd_seekIan Lance Taylor1-68/+123
checks the return value and handled bfd_error correctly. These changes are not itemised. Also: * oasys.c (oasys_read_record): Change return type to boolean. (oasys_slurp_symbol_table: Check oasys_read_record return value. (oasys_object_p, oasys_slurp_section_data): Likewise. (oasys_write_record): Change return type to boolean. (oasys_write_syms): Likewise. Also, check oasys_write_record return value. (oasys_write_sections): Check oasys_write_record return value. (oasys_write_header): Change return type to boolean. Check oasys_write_record return value. (oasys_write_end, oasys_write_data): Likewise. (oasys_write_object_contents): Check return values of oasys_write_header, oasys_write_syms, oasys_write_data, and oasys_write_end.
1994-04-04 Made sure that every call to bfd_read, bfd_write, and bfd_seekIan Lance Taylor1-12/+32
checks the return value and handled bfd_error correctly. These changes are not itemised. Also: * i386os9k.c (os9k_swap_exec_header_in): Change return type to boolean. (os9k_object_p): Check os9k_swap_exec_header_in return value.
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-04 Made sure that every call to bfd_read, bfd_write, and bfd_seekIan Lance Taylor1-10/+14
checks the return value and handled bfd_error correctly. These changes are not itemised. Also: * aoutx.h (emit_strtab): Change return type to boolean, and return errors. (NAME(aout,write_syms)): Check emit_strtab return value. (NAME(aout,final_link)): Likewise.
1994-04-04 * Makefile.in: Rebuilt dependencies.Ian Lance Taylor1-0/+4
1994-04-04 * aix386-core.c (aix386_bfd_is_local_label): Correct cast fromPeter Schauer4-3/+12
asection to asymbol. * ptrace-core.c (ptrace_unix_bfd_is_local_label): Correct cast from bfd to asymbol. * trad-core.c (trad_unix_bfd_is_local_label): Correct cast from asection to asymbol.
1994-04-04 * som.c (som_slurp_string_table): Use malloc to allocate spaceJeff Law2-6/+50
for the cached copy of the native string table. (som_slurp_symbol_table): Likewise for the native symbol table. (som_slurp_reloc_table): Likewise for the native and generic relocation tables. (som_bfd_free_cached_info): Free the cached native strings, symbols, and relocations. Also free the canonical cached relocations.
1994-04-01 * aoutx.h (aout_link_write_symbols): If keep_memory is false, makeIan Lance Taylor2-1/+23
sure the symbol name is stored in permanent memory before adding it to the string table.
1994-04-01 * archive.c (_bfd_write_archive_contents): Once we've found anIan Lance Taylor2-1/+45
object, don't bother to look for more when deciding whether to build a map. (compute_and_write_armap): After adding the symbols for a BFD, call bfd_free_cached_info on it.
1994-04-01 Add bfd_free_cached_info support to a.out backends.Ian Lance Taylor8-164/+200
* aoutx.h (aout_get_external_symbols): Renamed from aout_link_get_symbols. Read strings even if symbols have been read. Store string size in obj_aout_string_size. (NAME(aout,slurp_symbol_table)): Call aout_get_external_symbols to read the symbols. Allocate the cached symbols with malloc, not bfd_alloc. (NAME(aout,slurp_reloc_table)): Allocate the cached relocs with malloc, not bfd_alloc. (NAME(aout,bfd_free_cached_info)): New function; free cached symbols and relocs. * libaout.h (struct aoutdata): Add external_string_size field. (obj_aout_external_string_size): New accessor macro. (NAME(aout,close_and_cleanup)): Don't declare. (NAME(aout,bfd_free_cached_info)): Declare. (aout_32_close_and_cleanup): Don't define. (aout_64_close_and_cleanup): Don't define. * aout-target.h (MY_bfd_free_cached_info): If not already defined, define as NAME(aout,free_cached_info). (MY_close_and_cleanup): If not already defined, define as MY_bfd_free_cached_info. * aout-adobe.c (aout_32_close_and_cleanup): Define. (aout_32_bfd_free_cached_info): Don't define. * bout.c (aout_32_close_and_cleanup): Define. (aout_32_bfd_free_cached_info): Don't define. * hp300hpux.c (MY_bfd_free_cached_info): Define as bfd_true. (MY_close_and_cleanup): Don't define. * i386lynx.c (NAME(lynx,slurp_reloc_table)): Allocate the cached relocs with malloc, not bfd_alloc. * i386os9k.c (aout_32_close_and_cleanup): Define. (aout_32_bfd_free_cached_info): Don't define.
1994-04-01 * targets.c (bfd_target): Add _bfd_free_cached_info field.Ian Lance Taylor27-170/+329
* 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-04-01 * elf32-hppa.c (elf_hppa_reloc_type_lookup): Correct type ofIan Lance Taylor1-4/+4
first, unused, argument. (hppa_elf_is_local_label): Declare instead of som_bfd_is_local_label.
1994-04-01 * coff-a29k.c (a29k_reloc): Add reloc_entry->address to value ofIan Lance Taylor1-1/+2
absolute R_IREL reloc.
1994-03-31 Added some support for Irix 4 shared libraries.Ian Lance Taylor2-2/+42
* ecoff.c (ecoff_new_section_hook): Set SEC_SHARED_LIBRARY for a .lib section. (ecoff_sec_to_styp_flags): Set SEC_SHARED_LIBRARY if STYP_ECOFF_LIB bit is set. (ecoff_compute_section_file_positions): Round the contents of a .lib section up to the next page boundary. (ecoff_set_section_contents): If we see a .lib section, increment the vma by one to count the number of shared libraries we have. (ecoff_write_object_contents): Don't crash if we see a STYP_ECOFF_LIB section, and don't adjust text_start or data_start or bss_size either.
1994-03-31 * coffcode.h (CALC_ADDEND): Change to fetch original symbol valueIan Lance Taylor3-10/+275
from original BFD, rather than using value of current BFD symbol. Needed for new linker. * coff-sparc.c (CALC_ADDEND): Likewise.
1994-03-31 * ecoff.c (ecoff_write_object_contents): Set the text_start andIan Lance Taylor2-4/+18
data_start entries in the optional header correctly even if a text or data section starts at location zero.
1994-03-31Added missing ChangeLog entry for Sean's check in, and rebuiltIan Lance Taylor2-0/+5
bfd-in2.h.
1994-03-31 * nlm32-i386.c (nlm_i386_read_import): Null terminate the symbolIan Lance Taylor3-4/+806
name. * nlm32-alpha.c (nlm_alpha_read_import): Likewise. * nlm32-sparc.c (nlm_sparc_read_import): Likewise.
1994-03-31Missing BFD_RELOC_26.Sean Eric Fagan1-0/+1
1994-03-31 * coffgen.c (coff_write_symbol): Reindented. Changed to returnIan Lance Taylor3-172/+245
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-31 * som.c (som_begin_writing): New approach at dealing with holesJeff Law2-18/+34
in executables left by the HP linker. Does not rely on subspace alignments as subspaces are *NOT* guaranteed to be properly aligned in an executable (can you believe that!).
1994-03-30Wed Mar 30 16:25:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)Ian Lance Taylor43-961/+1301
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-30* hosts/dpx2.h: Define POSIX_UTIME.Jim Kingdon1-0/+4
1994-03-30 * i386dynix.c, config/i386-dynix.mt: New files, handling DynixPeter Schauer6-2/+104
variant of a.out. * configure.in, config.bfd: Use them for Dynix. * Makefile.in: Add dependencies for i386dynix.o. * targets.c: Add definition for i386dynix_vec.
1994-03-28Entry for last check in.Ian Lance Taylor1-0/+2
1994-03-28 * Makefile.in (BFD32_BACKENDS): Add coff-sparc.o.Ian Lance Taylor1-5/+10
1994-03-28 * coffcode.h (coff_set_flags): Handle bfd_arch_powerpc likeIan Lance Taylor2-5/+21
bfd_arch_rs6000.
1994-03-28An annoying typo (faflse instead of false). Oopsie.Sean Eric Fagan1-1/+1
1994-03-28 * config.bfd (powerpc-*-aix*): New target; use rs6000.mt.Ian Lance Taylor2-1/+7
1994-03-28 * configure.in (powerpc-*-aix*): New target; use rs6000.mt.Ian Lance Taylor1-0/+3
* config/rs6000.mt (SELECT_ARCHITECTURES): Add bfd_powerpc_arch.
1994-03-28 * aoutx.h (translate_from_native_sym_flags): Set SEC_RELOC flagIan Lance Taylor2-1/+6
for generated constructor section.
1994-03-27Arg. Forgot this in yesterday's cvs commit.Jeff Law1-8/+41
1994-03-26 * som.c (som_get_section_contents): New function. Do not tryJeff Law2-1/+23
to actually read data from a section that doesn't have either SEC_LOAD or SEC_DEBUGGING set (eg $BSS$) just return true.
1994-03-26 * libbfd.c (bfd_read): Set bfd_error as appropriate for a shortJeff Law16-1196/+1011
read. (bfd_error_system_call or bfd_error_file_truncated). * som.c: Do not blindly set bfd_error_system_call after a failing bfd_read, bfd_write, or bfd_seek. In a few places (like som_object_p) override the error status set by bfd_read. * aix386-core.c, aout-encap,c archive.c, bout.c: Likewise. * coff-rs6000.c, coffgen.c ecoff.c, elf.c: Likewise. * elf32-hppa.c, elfcode.h, hp300hpux.c, i386lynx.c: Likewise. * nlm32-alpha.c, nlm32-i386.c, nlm32-sparc.c: Likewise. * som.c: Check return values from several bfd_{seek,read,write} calls that we just assumed were not failing.
1994-03-26 * hosts/sysv4.h (HAVE_PROCFS): Add comments about ptx4.Jim Kingdon3-10/+32
* config/sysv4.mh: Add comment. * config/symmetry.mh: Change comment. * configure.host: Use sysv4, not symmetry, for i[34]86-sequent-sysv4*.
1994-03-25 Changes to support linker relaxing of embedded MIPS PIC code toIan Lance Taylor7-220/+1247
use a five instruction sequence for funtion calls which are out of range of the bal instruction. * libecoff.h (struct ecoff_section_tdata): Define. (ecoff_section_data): Define. (ecoff_bfd_relax_section): Don't define. * ecoff.c (ecoff_final_link_debug_accumulate): Don't read or free the debugging information if it has already been read. (ecoff_indirect_link_order): Handle _cooked_size being different from _raw_size. Don't reread the contents or the relocs if they have already been read in. * coff-mips.c (mips_howto_table): Change bitsize of PCREL16 from 18 to 16. (PCREL16_EXPANSION_ADJUSTMENT): Define. (mips_relocate_refhi): Take adjust argument. (mips_relocate_section): Handle reloc offsets stored in section used_by_bfd field. Call mips_relax_pcrel16 to handle details of expanding an out of range PCREL16. Keep trace of adjustments required by expansions. Set s and unset h when converting a reloc from undefined to section. Change handling of PC relative relocs: if against a section, they are correct in the object file, if against an external symbol they are pcrel_offset. (mips_relax_section): New function. (mips_relax_pcrel16): New function. (ecoff_bfd_relax_section): Define. * coff-alpha.c (ecoff_bfd_relax_section): Define. * ecofflink.c (bfd_ecoff_debug_accumulate): Handle adjustments built by mips_relax_section when writing out addresses. * elf32-mips.c (mips_elf_read_ecoff_info): Clear adjust field.
1994-03-25Fix typo in comment.Ian Lance Taylor1-1/+1
1994-03-25 * aoutx.h (NAME(aout,find_nearest_line)): The caller expectsIan Lance Taylor2-2/+271
functionname_ptr to be set to a symbol name, so prepend symbol_leading_char.
1994-03-24Thu Mar 24 11:33:46 1994 Steve Chamberlain (sac@jonny.cygnus.com)Steve Chamberlain3-18/+47
* coff-h8300.c (h8300_reloc16_extra_cases): Add relaxing info for 16bit relative branches. * coff-h8500.c (r_high8, r_low16, r_high16): Don't complain on overflow.
1994-03-24 * som.c (som_bfd_prep_for_ar_write): Ignore non-SOM objects.Jeff Law2-2/+30
(som_bfd_ar_write_symbol_stuff, som_write_armap): Likewise.
1994-03-23 * netbsd386.c (N_SET_FLAGS): Delete the old definition.David MacKenzie1-2/+0