aboutsummaryrefslogtreecommitdiff
path: root/bfd
AgeCommit message (Collapse)AuthorFilesLines
1994-04-15 * coff-a29k.c (reloc_processing): Always set the address of aIan Lance Taylor2-0/+21
R_IHCONST reloc to that of the immediately preceding R_IHIHALF. gas does this anyhow, but some other assemblers seem to leave garbage in the R_IHCONST address field.
1994-04-15 * bfd/archive.c: Consistently use ARFMAG; fromIan Lance Taylor1-0/+7
schwab@issan.informatik.uni-dortmund.de (Andreas Schwab). (_bfd_write_archive_contents): Use ARFMAG rather than '`' and '\012'. (bsd_write_armap): Likewise. (coff_write_armap): Likewise.
1994-04-15 * coff-mips.c (mips_relocate_section): When relaxing, adjust localIan Lance Taylor2-21/+54
relocs against the .text section as required. * ecofflink.c (bfd_ecoff_debug_accumulate): When relaxing, adjust PDR addresses as required.
1994-04-15 * ecoff.c (ecoff_emit_aggregate): Take fdr argument. Map fdrIan Lance Taylor2-46/+94
index through rfd map if it exists. Check for a couple of cases which gdb handles specially. Change all callers. (ecoff_type_to_string): Take fdr argument rather than aux_ptr and bigendian argument. Change all callers. (ecoff_print_symbol): Handle stStruct, stUnion and stEnum.
1994-04-14Wed Apr 13 11:50:07 1994 Stan Shebs (shebs@andros.cygnus.com)Stan Shebs2-1/+5
* coff-sparc.c (sparccoff_vec): Set minimum alignment power to 3.
1994-04-14 * coff-mips.c (mips_howto_table): Add dummy entries to account forIan Lance Taylor2-120/+505
numbering changes in include/coff/mips.h. Add entries for MIPS_R_RELHI and MIPS_R_RELLO. (mips_ecoff_swap_reloc_in): Handle an extra bit for the reloc type when little endian. Treat internal MIPS_R_RELLO or MIPS_R_RELHI relocs like MIPS_R_SWITCH, and convert r_offset from 24 to 32 bits. (mips_ecoff_swap_reloc_out): Likewise. (mips_adjust_reloc_in): Handle internal MIPS_R_RELLO or MIPS_R_RELHI relocs like MIPS_R_SWITCH. (mips_adjust_reloc_out): Likewise. (mips_relhi_addr, mips_relhi_addend): New static variables. (mips_relhi_reloc, mips_rello_reloc): New functions. (mips_bfd_reloc_type_lookup): Turn BFD_RELOC_PCREL_HI16_S into MIPS_R_RELHI and turn BFD_RELOC_PCREL_LO16 into MIPS_R_RELLO. (mips_relocate_hi): Rename from mips_relocate_refhi, and add pcrel argument. Changed all callers. (mips_relocate_section): Rename got_reflo to got_lo and reflo_int_rel to lo_int_rel. Handle MIPS_R_RELLO and MIPS_R_RELHI relocs. (mips_relax_section): Adjust MIPS_R_RELHI/MIPS_R_RELLO pairs when expanding a PC relative call.
1994-04-14 * reloc.c (bfd_reloc_code_real_type): Add BFD_RELOC_PCREL_HI16_SIan Lance Taylor1-0/+4
and BFD_RELOC_PCREL_LO16. * bfd-in2.h: Rebuilt.
1994-04-12 * som.c (som_write_fixups): Always emit at leastJeff Law2-3/+8
one relocation for any non-bss section.
1994-04-11 * elfcode.h (assign_file_positions_except_relocs): Don't requireIan Lance Taylor2-0/+7
the file alignment to correspond to the page size when linking with -N.
1994-04-10 * elfcode.h (write_relocs): For rela relocations, adjust theJeff Law2-0/+18
addend for relocations involving section symbols to account for the lossage of 1:1 mapping from input section symbols to output section symbols.
1994-04-08 * aoutx.h (NAME(aout,make_sections)): New function.Ian Lance Taylor2-31/+44
(NAME(aout,some_aout_object_p)): Call NAME(aout,make_sections) rather than making sections inline. (NAME(aout,mkobject)): Don't make any sections. (NAME(aout,adjust_sizes_and_vmas)): Call NAME(aout,make_sections). (NAME(aout,final_link)): Don't dereference obj_textsec (abfd) or obj_datasec (abfd) if they are NULL. * libaout.h (NAME(aout,make_sections)): Declare. * bout.c (b_out_mkobject): Don't make any sections. (b_out_write_object_contents): Call aout_32_make_sections. (b_out_set_section_contents): Likewise. * i386os9k.c (os9k_mkobject): Don't make any sections. (os9k_write_object_contents): Call aout_32_make_sections. (os9k_set_section_contents): Likewise.
1994-04-08 * aoutx.h (NAME(aout,new_section_hook)): Don't set N_EXT in targetIan Lance Taylor2-3/+8
index.
1994-04-08 * config.bfd, configure.host: Add mips-*-sysv4* support.Peter Schauer1-0/+4
1994-04-07 * coff-mips.c (mips_howto_table): Add entry for MIPS_R_SWITCH.Ian Lance Taylor2-44/+226
(mips_ecoff_swap_reloc_in): For MIPS_R_SWTICH, copy r_symndx into r_offset and set r_symndx to RELOC_SECTION_TEXT. (mips_ecoff_swap_reloc_out): For MIPS_R_SWITCH, get the r_symndx value from the r_offset field. (mips_adjust_reloc_in): Maximum r_type value is now MIPS_R_SWITCH. For MIPS_R_SWITCH, copy the r_offset field into the addend field. (mips_adjust_reloc_out): For MIPS_R_SWITCH, copy the addend field into the r_offset field. (mips_switch_reloc): New function. (mips_bfd_reloc_type_lookup): Translate BFD_RELOC_GPREL32 into MIPS_R_SWITCH. (mips_relocate_section): Handle MIPS_R_SWITCH. (mips_relax_section): Adjust MIPS_R_SWITCH offset if necessary.
1994-04-07Comment change.Ian Lance Taylor1-10/+13
1994-04-07 * elfcode.h (elf_set_section_contents): Support calling the backendJeff Law5-0/+50
function elf_backend_begin_write_processing when just beginning to write an object file. * libelf.h (elf_backend_begin_write_processing): Declare. * elf{32,64}-target.h (elf_backend_begin_write_processing): Provide a default definition. (elf{32,64}_bed): Add elf_backend_begin_write_processing. * elf32-hppa.h (elf_hppa_tc_symbol): Delete extern declaration. (elf_hppa_tc_make_sections): Likewise. * elf32-hppa.c (symext_chain_built): Delete. (symext_chain_size): Renamed from symextn_contents_real_size. (elf32_hppa_backend_{begin,final}_write_processing): New functions. (add_entry_to_symext_chain): New function. (hppa_elf_set_section_contents): Ignore writes to the symbol extension section until it's been rebuilt internally. (hppa_elf_get_section_contents): Symbol extension section is no longer special. (elf_backend_{begin,final}_write_processing): Define. (elf_hppa_tc_make_sections): Simplify now that much code has migrated into elf32_hppa_backend_{being,final}_write_processing.
1994-04-07 * All backends: Added BFD_JUMP_TABLE_DYNAMIC to target vector.Ian Lance Taylor14-11/+100
1994-04-07 * sunos.c (MY_read_dynamic_symbols): Don't define.Ian Lance Taylor2-129/+35
(MY_read_dynamic_relocs): Don't define. (MY_get_dynamic_symtab_upper_bound): Define. (MY_canonicalize_dynamic_symtab): Define. (MY_get_dynamic_reloc_upper_bound): Define. (MY_canonicalize_dynamic_reloc): Define. (struct sunos_dynamic_info): Change type of dynsym_count and dynrel_count to long. Add fields canonical_dynsym and canonical_dynrel. (sunos_read_dynamic_info): Check that BFD had DYNAMIC flag set. Clear info->canonical_dynsym and info->canonical_dynrel. (MY(read_dynamic_symbols)): Removed. (MY(read_dynamic_relocs)): Removed. (sunos_get_dynamic_symtab_upper_bound): New function. (sunos_canonicalize_dynamic_symtab): New function. (sunos_get_dynamic_reloc_upper_bound): New function. (sunos_canonicalize_dynamic_reloc): New function. * libaout.h: Declare struct reloc_ext_external and reloc_std_external to avoid prototype problems. (struct aout_backend_data): Remove fields read_dynamic_symbols and read_dynamic_relocs. (NAME(aout,translate_symbol_table)): Declare. (NAME(aout,swap_ext_reloc_in)): Declare. (NAME(aout,swap_std_reloc_in)): Declare. * aoutx.h (NAME(aout,translate_symbol_table)): Renamed from translate_symbol_table and made non-static. Changed all callers. (NAME(aout,slurp_symbol_table)): Don't read dynamic symbols. (NAME(aout,slurp_reloc_table)): Don't read dynamic relocs. (NAME(aout,get_reloc_upper_bound)): Don't count dynamic relocs. * aoutf1.h (aout_32_sunos4_write_object_contents): Don't bother to remove dynamic symbols and relocs. They will no longer be present. (MY_read_dynamic_symbols): Don't define. (MY_read_dynamic_relocs): Don't define. (sunos4_aout_backend): Don't initialize dynamic entry points. * aout-target.h (MY_read_dynamic_symbols): Don't define. (MY_read_dynamic_relocs): Don't define. (MY(backend_data)): Don't initialize dynamic entry points. (MY_get_dynamic_symtab_upper_bound): If not defined, define to _bfd_nodynamic version. (MY_canonicalize_dynamic_symtab): Likewise. (MY_get_dynamic_reloc_upper_bound): Likewise. (MY_canonicalize_dynamic_reloc): Likewise.
1994-04-07 * targets.c (bfd_target): Add fieldsIan Lance Taylor2-19/+65
_bfd_get_dynamic_symtab_upper_bound, _bfd_canonicalize_dynamic_symtab, _bfd_get_dynamic_reloc_upper_bound, _bfd_canonicalize_dynamic_reloc. (BFD_JUMP_TABLE_DYNAMIC): Define. * libbfd-in.h (_bfd_nodynamic_get_dynamic_symtab_upper_bound): Define. (_bfd_nodynamic_canonicalize_dynamic_symtab): Define. (_bfd_nodynamic_get_dynamic_reloc_upper_bound): Define. (_bfd_nodynamic_canonicalize_dynamic_reloc): Define. * bfd.c (bfd_get_dynamic_symtab_upper_bound): Define. (bfd_canonicalize_dynamic_symtab): Define. (bfd_get_dynamic_reloc_upper_bound): Define. (bfd_canonicalize_dynamic_reloc): Define. * bfd-in2.h: Rebuilt. * libbfd.h: Rebuilt.
1994-04-07 * cf-m68klynx.c: Include sysdep.h.Ian Lance Taylor1-0/+1
1994-04-07Updated copyright (bfd-in2.h check in coming soon).Ian Lance Taylor1-1/+1
1994-04-06 * targets.c (bfd_target): Rearranged fields in target vector.Ian Lance Taylor49-1426/+1714
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-04-06 * Crude support for examining dynamic libraries.Jeff Law2-15/+42
* som.c (som_object_setup): Set DYNAMIC flag for SHL_MAGIC and DL_MAGIC objects. (som_prep_headers): Preserve the system_id for DYNAMIC objects. Use SHL_MAGIC as the magic number of the DYNAMIC flag is set. Write exec headers for DYNAMIC objects. (som_begin_writing): DYNAMIC objects have the same alignment restrictions as D_PAGED objects. (bfd_section_from_som_symbol): Treat DYNAMIC objects like EXEC_P objects. (object_flags): Add DYNAMIC.
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.