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.
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.
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.
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.
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.
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.
* 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.
* 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.
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.
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!).
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.
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.
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.
* targets.c (_bfd_relax_section): Take boolean *again argument
rather than asymbol list.
* bfd.c (bfd_relax_section): Change name of fourth argument from
symbols to again.
* reloc.c (bfd_generic_relax_section): Take boolean *again
argument rather than asymbol list. Always return true.
* bout.c: Include genlink.h.
(aligncode, perform_slip): Declare.
(perform_slip): Take BFD argument rather than asymbol list.
Changed all callers. Get the symbols from the BFD. Change the
hash table entry value as well as the symbol value.
(abs32code): Take BFD argument rather than asymbol list. Changed
all callers.
(aligncode): Likewise.
(b_out_relax_section): Take boolean *again argument rather than
asymbol list. Only return false if an error occurred. Set *again
to false. Get symbols from BFD.
* reloc16.c: Include genlink.h.
(bfd_perform_slip): Take BFD argument rather than asymbol list.
Get the symbols from the BFD. Change the hash table entry value
as well as the symbol value.
(bfd_coff_reloc16_relax_section): Take boolean *again argument
rather than asymbol list. Only return false if an error occurred.
Set *again to false. Get symbols from BFD.
* coffcode.h (bfd_coff_backend_data): Change
_bfd_coff_reloc16_estimate to take BFD argument rather than
asymbol list.
(bfd_coff_reloc16_estimate): Corresponding change.
(dummy_reloc16_estimate): Corresponding change.
* libcoff-in.h (bfd_coff_reloc16_relax_section): Change
declaration to take boolean * rather than asymbol list.
(bfd_perform_slip): Change declaration to take BFD rather than
asymbol list.
* coff-h8300.c (h300_reloc16_estimate): Take BFD argument rather
than asymbol list. Changed calls to bfd_perform_slip.
* bfd-in2.h: Rebuilt.
* libbfd.h: Rebuilt.
* libcoff.h: Rebuilt.
* Makefile.in: Rebuilt dependencies.
reloc, used in embedded PIC code.
(mips_adjust_reloc_in): Change sanity check to permit new reloc.
(mips_bfd_reloc_type_lookup): Turn BFD_RELOC_16_PCREL_S2 into
MIPS_R_PCREL16.
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.
for first character in an extended name.
(_bfd_write_archive_contents): If ar_padchar == '/', then use
"//" as the name of the special archive member holding the
extended name table.
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.
som_section_from_subspace_index. Pass in a native SOM symbol.
For executables, iterate through the sections to find out
which contains the symbol's address rather than using the
symbol_info field. (symbol_info has a different meaning for
dynamicly linked executables.)