section (not input) will be in sections ".sbss", ".sbss2",
".sdata", and ".sdata" for R_PPC_SDAREL16, R_PPC_EMB_SDA2REL,
R_PPC_EMB_SDA21, R_PPC_EMB_RELSDA. In all these cases also ignore
output_offset for correct evaluation of addend.
PR16246
elf32_arm_allocate_interworking_sections and
elf32_arm_process_before_allocation.
* bfd-in.h: Ammend prototype for
elf32_arm_process_before_allocation to remove surplus third
argument.
* bfd-in2.h: Regenerate.
* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Generate PLT
entries unless the symbol is defined in the executable; in
particular, undefined weak symbols get a PLT entry.
argument is_local. Add argument sym_flags. Check sym_flags
in R_ARM_ABS32 case. Include addend for R_ARM_THM_PC22 case.
(elf32_arm_relocate_section): Don't pass local sym and pass
sym_flags to elf32_arm_final_link_relocate.
.got if any relocation referrs to _GLOBAL_OFFSET_TABLE_.
(ppc_elf_relocate_section): Pull sgot and splt search to the start
of the function. Recognize no .plt as static linking.
* Makefile.in: Rebuild.
* config.bfd (arm-*-elf): Define targ_defvec and targ_selvecs.
(thumb-*-elf): Define targ_defvec and targ_selvecs.
* configure.in: Handle bfd_elf32_littlearm_vec and bfd_elf32_bigarm_vec.
* configure: Regenerate.
* elf.c: (prep_headers): Support arch_type of EM_ARM.
* targets.c: Support new targets bfd_elf32_bigarm_vec and
bfd_target bfd_elf32_littlearm_vec.
* elf32-arm.c: New file.
The value of R_MIPS15_S3 has changed:
* elf32-mips.c (elf_mips15_s3_howto): New static variable.
(mips_reloc_map): Remove BFD_RELOC_MIPS15_S3.
(bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS15_S3
specially.
(mips_info_to_howto_rel): Handle R_MIPS15_S3 specially.
(mips_elf_relocate_section): Check for R_MIPS15_S3.
end-sanitize-r5900
* elf32-mips.c (elf_mips_howto_table): Add reloc types used on
Irix 6.
(bfd_elf32_bfd_reloc_type_lookup): Add default case.
* elf64-mips.c: Replace all uses of mips_elf64_reloc_type with
elf_mips_reloc_type defined in elf/mips.h.
* elf-m10300.c (elf32_mn10300_link_hash_entry): Add new field
"movm_stack_size".
(mn10300_elf_relax_section): Include stack space for register saves
in the imm8 field of a "call" instruction.
(compute_function_info): Determine how much stack is allocated by
the movm instruction. Fix typo.
(elf32_mn10300_link_hash_newfunc): Initialize movm_stack_size.
functionname_ptr to be const. Change line_ptr to be unsigned.
* coffcode.h (coff_link_output_has_begun): Simplify handling when
macro is not defined. Change second parameter from bfd_link_info
to coff_final_link_info. Add prototype.
(coff_final_link_postscript): Simplify handling when macro is not
defined. Add prototype.
* elf32-i386.c (elf_backend_got_header_size): Define.
(elf_backend_plt_header_size): Define.
* elf32-m68k.c, elf32-mips.c, elf32-ppc.c: Likewise.
* elf32-sparc.c, elf64-alpha.c, elf64-sparc.c: Likewise.
* elfxx-target.h: Provide a default of zero.
* elflink.c (_bfd_elf_create_got_section): Use got_header_size.
* elflink.h (elf_gc_common_finalize_got_offsets): Likewise.
* elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't remove a PLT
entry from an executable, even if the plt refcount goes to 0.
* aoutx.h (NAME(aout,find_nearest_line)): Also remember the
directory name at the line number.
* elf.c (_bfd_elf_find_nearest_line): Also consider symbols
with an unspecified type.
* elf32-m68k.c (elf_m68k_check_relocs): Also reference count
R_68K_PCxx and R_68K_xx relocations. Make sure that
ELF_LINK_HASH_NEEDS_PLT is always set for a PLT reloc reference.
(elf_m68k_gc_sweep_hook): Also reference count R_68K_PCxx and
R_68K_xx relocations.
(elf_m68k_adjust_dynamic_symbol): Reset the plt offset of a symbol
that has no plt entry.
(elf_m68k_relocate_section): Ignore the plt offset in a static
link.
* elflink.h (elf_adjust_dynamic_symbol): Reset the plt offset for
an ignored symbol.
(elf_gc_common_finalize_got_offsets): Set the got offsets also in
a static link.
* elf32-m68k.c (R_68K_GNU_VTINHERIT, R_68K_GNU_VTENTRY): New reloc
types.
(howto_table, reloc_map): Add entries for them.
(elf_m68k_check_relocs): Handle them. Implement reference
counting for got and plt entries.
(elf_m68k_gc_mark_hook, elf_m68k_gc_sweep_hook): New functions.
(elf_m68k_adjust_dynamic_symbol): Handle unreferenced plt
symbols.
(rtype_to_howto_rel, elf_info_to_howto_rel): Delete.
(elf_m68k_relocate_section): Handle the new reloc types.
(bfd_elf32_bfd_final_link, elf_backend_gc_mark_hook,
elf_backend_gc_sweep_hook, elf_backend_can_gc_sections): Define.
* elflink.h (elf_link_add_object_symbols): When creating an
indirect reference for symbol versioning also copy the plt
offset.
(elf_fix_symbol_flags): When clearing the ELF_LINK_HASH_NEEDS_PLT
flag also reset the plt offset.
(elf_link_assign_sym_version): Likewise.
(elf_gc_common_finalize_got_offsets): Increment the got offset by
the size of the entry in bytes.
(elf_gc_allocate_got_offsets): Likewise.
Tue Jul 14 11:18:14 1998 Ian Lance Taylor <ian@cygnus.com>
* elflink.h (elf_gc_sections): Return true rather than falling off
the bottom.
a PT_LOAD segment, rather than only setting it once for the entire
file.
* elf.c (_bfd_elf_make_section_from_shdr): When setting the LMA,
rather than ignoring every phdr with a p_paddr of 0, ignore all
the phdrs if they all have a p_paddr of 0.
* elf-m10300.c: Include elf/mn10300.h
(elf_mn10300_mach): New function.
(_bfd_mn10300_elf_final_write_processing): Likewise.
(_bfd_mn10300_elf_object_p): Likewise.
(elf_backendfinal_write_processing): Define.
(elf_backend_object_p): Likewise.
start-sanitize-am33
* archures.c (bfd_mach_am33): Define.
* cpu-m10300.c (bfd_am33_arch): New arch info structure. Link it
into the NEXT field of bfd_mn10300_arch.
end-sanitize-am33
* elf32-ppc.c (ppc_elf_relocate_section): The target of an
R_PPC_LOCAL24PC relocation should be local; if not, print an error
message instead of crashing.
* archures.c (bfd_mach_cpu32): Define.
(bfd_default_scan): Add case for 68060. Fix 68332 case to use
bfd_mach_cpu32.
* cpu-m68k.c (arch_info_struct): Add m68k:cpu32.
* ieee.c: Include <ctype.h>.
(ieee_object_p): Parse out process ID string to make it more
likely to be acceptable for bfd_scan_arch.
* bfd-in2.h: Rebuild.
field of .DVP.ovlytab to .DVP.ovlystrtab's section index.
(_bfd_mips_elf_section_from_shdr): Recognize SHT_DVP_OVERLAY_TABLE
and SHT_DVP_OVERLAY.
(_bfd_mips_elf_fake_sections): Ditto.
* aix386-core.c: Don't include <stdio.h>, <stddef.h>, or
<errno.h>.
* aoutx.h: Don't include <string.h>. Use "sysdep.h" rather than
<sysdep.h>.
* archive.c: Don't include <string.h> or <errno.h>.
* evax-alpha.c; Don't include <stdio.h>.
* evax-egsd.c: Likewise.
* evax-etir.c: Likewise.
* evax-misc.c: Likewise.
* evax-emh.c: Likewise. Also, don't include <sys/types.h>.
* hppabsd-core.c: Don't include <stdio.h>, <sys/types.h>, or
<errno.h>.
* hpux-core.c: Likewise.
* netbsd-core.c: Likewise.
* som.c: Likewise.
* libbfd.c: Don't include <sys/types.h>.
* nlmcode.h: Don't include <string.h>.
* osf-core.c: Don't include <string.h> or <stdio.h>.
* ptrace-core.c: Don't include <stdio.h>, <sys/types.h>,
<errno.h>, or <unistd.h>.
* trad-core.c: Don't include <stdio.h> or <sys/types.h>.
(_bfd_mips_elf_object_p): Use elf_mips_mach.
(_bfd_mips_elf_final_write_processing): Use the names
of machines, rather than the numbers. Set both the ARCH
and MACH in e_flags. Handle a few more specific machines.
(_bfd_mips_elf_merge_private_bfd_data): Merge both
EF_MIPS_ARCH and EF_MIPS_MACH.
* mips.h (EF_MIPS_MACH,E_MIPS_MACH_*): Added.
not signed.
* peicode.h (pe_saved_coff_bfd_print_private_bfd_data): Use PARAMS
when declaring parameter types.
(pe_saved_coff_bfd_copy_private_bfd_data): Likewise.
targ_selvecs, then add the generic ELF targets to targ_selvecs.
* elf32-gen.c (dummy): New static const variable.
(elf_generic_info_to_howto): New static function.
(elf_generic_info_to_howto_rel): New static function.
(elf_info_to_howto): Define as elf_generic_info_to_howto.
(elf_info_to_howto_rel): Define as elf_generic_info_to_howto_rel.
* elf64-gen.c: Same changes as elf32-gen.c.
* elfcode.h (elf_object_p): For the generic target, ignore a
failure of bfd_default_set_arch_mach. Fix indentation a bit.
(elf64_alpha_relax_section): Fill them in.
(elf64_alpha_relax_opt_call): Implement more than a stub.
(elf64_alpha_add_symbol_hook): Don't set SEC_LOAD or default
alignment on .scommon.
(elf64_alpha_merge_gots): Merge use counts as well.
for calculating a local symbol's address.
(elf64_alpha_calc_got_offsets): Skip entries with 0 use count.
Set the .got's cooked size as well as the raw size.
elf64_alpha_relax_find_reloc_ofs. Changed all callers.
(elf64_alpha_add_symbol_hook): Put small commons in .scommon not .sbss.
(elf64_alpha_size_got_sections): Don't merge .got sections twice.
addr_size.
(read_address): Replace 'bdf*' argument with 'comp_unit*' argument.
Use addr_size for address size, rather than sizeof(bfd_vma).
(read_attribute): Replace bdf* argument with 'comp_unit*' argument.
Fix call to read_address.
(decode_line_info): Replace bdf* argument with 'comp_unit*' argument.
Scrap other unneeded arguments. Fix call to read_address.
(scan_unit_for_functions): Fix call to read_attribute.
(parse_comp_unit): We now handle more values for addr_size.
Set addr_size in unit. Fix call to read_attribute and
decode_line_info.
* elf32-m68k.c (elf_m68k_size_dynamic_sections): Generate section
symbols when creating a shared library.
(elf_m68k_adjust_dynindx): New function, used by above code.
(elf_m68k_finish_dynamic_sections): Initialize the section
symbols.
(elf_m68k_relocate_section): Change abort to BFD_ASSERT.
copy_private_bfd_data once we've seen the last SEC_ALLOC section.
Fixes strip on Irix 6. Without this, a stripped program would report
22964:g++: rld: Warning: This object has a DT_MIPS_OPTIONS tag, but no corresponding
program header. This could be the result of file corruption
or faulty compilation/linking.
* archures.c (bfd_mach_m68*): Add definitions for various m68k
variants.
(bfd_default_scan): Remove m68k special cases.
* bfd-in2.h: Rebuild.
* mipsbsd.c (MY(write_object_contents)): Use bfd_mach_m680*
instead of plain numbers.
* sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
* cpu-m68k.c (arch_info_struct): Likewise. Add entry for
m68k:68000.
(bfd_m68k_arch): Set mach field to zero to signal no explicit
selection, change printable_name to just "m68k" and make that the
default instead of m68k:68020.
* aout-tic30.c (NAME): Define this to avoid multiple definitions
from aoutx.h.
(MY_get_section_contents): Define as aout_32_get_section_contents
rather than NAME(aout,get_section_contents).
* elf-m10300.c (elf32_mn10300_link_hash_table_create): Fix cast.
Wed Mar 25 11:19:28 1998 Ian Lance Taylor <ian@cygnus.com>
* elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Change
byte_count to unsigned int.
(mn10300_elf_relax_section): Initialize internal_relocs. Remove
unused local variables.
* evax-alpha.c (evax_set_arch_mach): Only accept bfd_arch_alpha
and call bfd_default_set_arch_mach to do the real work.
Wed Mar 25 13:59:05 1998 Ian Lance Taylor <ian@cygnus.com>
* evax-alpha.c (evax_close_and_cleanup): Remove unused local
variables er and er1.
* ihex.c (ihex_scan): Add extbase variable so that getting an
extended linear address record does not ignore any previous
extended address.
(ihex_write_object_contents): When writing out an extended linear
address record, zero out any previous extended address.
* ieee.c (do_one): Check section before dereferencing it.
(ieee_canonicalize_reloc): Likewise with src->relent.sym_ptr_ptr.
(ieee_generic_stat_arch_elt): Likewise with abfd->my_archive.