Commit Graph

4931 Commits

Author SHA1 Message Date
Alan Modra aa49a487e3 daily update 2005-10-28 00:00:07 +00:00
Alan Modra 95560129db PR 973
* cache.c (enum cache_flag): New.
	(close_one): Save file mtime.
	(bfd_cache_lookup): Add flag arg, adjust all users.
	(bfd_cache_lookup_worker): Likewise.
	(cache_btell): Use CACHE_NO_OPEN and return abfd->where if file
	not open.
	(cache_bflush): Similarly, and return success of file not open.
	(cache_bseek): Use CACHE_NO_SEEK if SEEK_SET or SEEK_END.
	(cache_bstat): Use CACHE_NO_SEEK_ERROR.
2005-10-27 05:31:16 +00:00
Alan Modra 182a009999 * bfdwin.c (bfd_get_file_window): Seek into file in place of
using bfd_cache_lookup.
2005-10-27 04:06:35 +00:00
Alan Modra d00967c705 * cache.c (BFD_CACHE_MAX_OPEN): Make private to this file.
(bfd_last_cache, bfd_cache_lookup, bfd_cache_lookup_worker): Likewise.
	* libbfd-in.h (bfd_cache_lookup_worker, bfd_last_cache): Delete.
	* libbfd.h: Regenerate.
2005-10-27 03:36:57 +00:00
Alan Modra b677b8c0b9 * hppabsd-core.c (hppabsd_core_core_file_p): Use bfd_stat, not fstat.
* sco5-core.c (sco5_core_file_p): Likewise.
	* trad-core.c (trad_unix_core_file_p): Likewise.
2005-10-27 03:35:30 +00:00
Alan Modra d0fdd288c7 * cache.c: Reorganize file to avoid forward reference. 2005-10-27 03:22:13 +00:00
Alan Modra 2ca673f687 daily update 2005-10-27 00:00:05 +00:00
Alan Modra 3dff57e847 * cache.c (bfd_cache_lookup_worker): Don't abort on failing to
reopen file.
	(cache_btell, cache_bseek, cache_bflush, cache_bstat): Return -1 on
	bfd_cache_lookup failure.
	(cache_bread, cache_bwrite): Return 0 on the same.
	* bfdwin.c (bfd_get_file_window): Likewise.
	* hppabsd-core.c (hppabsd_core_core_file_p): Likewise.
	* sco5-core.c (sco5_core_file_p): Likewise.
	* trad-core.c (trad_unix_core_file_p): Likewise.
2005-10-26 12:17:42 +00:00
Alan Modra d53e85d8ff * cache.c (bfd_cache_lookup_worker): Use bfd_error_handler
rather than bfd_perror.  Print file name.  Internationalise.
2005-10-26 07:38:25 +00:00
Alan Modra 5c91cdfb25 * cache.c (bfd_open_file): Set bfd_error_system_call on failure
to open file.
	(bfd_cache_lookup_worker): Remove check that file pos is in
	unsigned long range.  Print system error before aborting.
2005-10-26 04:29:53 +00:00
Alan Modra 11ddad1b0b daily update 2005-10-26 00:00:05 +00:00
Nick Clifton 3c9b82baee Add support for the Z80 processor family 2005-10-25 17:40:19 +00:00
Alan Modra fcfa13d2b2 PR ld/1540
* elf-bfd.h (elf_backend_copy_indirect_symbol): Replace pointer to
	elf_backend_data with pointer to bfd_link_info.
	(_bfd_elf_link_hash_copy_indirect): Likewise.
	* elf.c (_bfd_elf_link_hash_copy_indirect): Likewise.  Handle
	direct and indirect symbols both having dynamic link info.
	* elf32-arm.c (elf32_arm_copy_indirect_symbol): Likewise.
	* elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
	* elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
	* elf32-m32r.c (m32r_elf_copy_indirect_symbol): Likewise.
	* elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
	* elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
	* elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
	* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
	* elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
	* elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
	* elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
	* elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
	* elfxx-sparc.c (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
	* elflink.c: Adjust all calls to bed->elf_backend_copy_indirect_symbol.
	* elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Update prototype.
	* elfxx-sparc.h (_bfd_sparc_elf_copy_indirect_symbol): Likewise.
2005-10-25 16:19:08 +00:00
Alan Modra 3caac5b897 Regenerate 2005-10-25 02:20:17 +00:00
Alan Modra cc722a42f4 daily update 2005-10-25 00:00:07 +00:00
Jie Zhang 9ba4c44513 bfd/
* elf32-bfin.c (bfd_bfin_elf32_create_embedded_relocs): Fix signedness
	warning.
gas/
	* Makefile.am (bfin-parse.h): Renamed from bfin-parse.tab.h.
	(EXTRA_DIST): Add bfin-parse.h and bfin-lex.c.
	* Makefile.in: Regenerate.
	* config/bfin-lex.l: Include bfin-parse.h instead of bfin-parse.tab.h.
	* config/tc-bfin.c (md_chars_to_number): Change the type of first
	argument from unsigned char * to char * to remove signedness warnings.
2005-10-24 16:31:22 +00:00
Jie Zhang f470759536 * elf32-bfin.c (bfin_howto_table): Set src_mask to 0 for all relocs.
(bfin_imm16_reloc): Always add in the addend.  Don't fetch existing
	contents from section.
	(bfin_relocate_section): Rework so as to not call special_functions.
	Handle the relocation stack here.  Treat pcrel24 relocs specially.
2005-10-24 14:25:13 +00:00
Alan Modra f02571c5d9 * elflink.c (elf_link_input_bfd): Don't use linker_mark and
SEC_EXCLUDE to test for sections dropped from output.  Instead,
	use bfd_section_removed_from_list on normal sections.  Don't
	attempt to handle symbols with unknown reserved section indices.
	* linker.c (_bfd_generic_link_output_symbols): Don't use
	linker_mark to test for symbols belonging to dropped sections.
	Do allow absolute symbols.
2005-10-24 11:24:31 +00:00
Alan Modra 3e45f319ea * elf32-i370.c (i370_elf_fake_sections): Don't set SHF_EXCLUDE on
group sections.
2005-10-24 11:18:03 +00:00
Jan Beulich 6a2375c6b2 include/opcode/
2005-10-24  Jan Beulich  <jbeulich@novell.com>

	* ia64.h (enum ia64_opnd): Move memory operand out of set of
	indirect operands.

bfd/
2005-10-24  Jan Beulich  <jbeulich@novell.com>

	* cpu-ia64-opc.c (elf64_ia64_operands): Move memory operand out of
	set of indirect operands.

gas/
2005-10-24  Jan Beulich  <jbeulich@novell.com>

	* config/tc-ia64.c (enum reg_symbol): Delete IND_MEM.
	(dot_rot): Change type of num_* variables. Check for positive count.
	(ia64_optimize_expr): Re-structure.
	(md_operand): Check for general register.

gas/testsuite/
2005-10-24  Jan Beulich  <jbeulich@novell.com>

	* gas/ia64/index.[sl]: New.
	* gas/ia64/rotX.[sl]: New.
	* gas/ia64/ia64.exp: Run new tests.

opcodes/
2005-10-24  Jan Beulich  <jbeulich@novell.com>

	* ia64-asmtab.c: Regenerate.
2005-10-24 07:42:50 +00:00
Alan Modra d30e8e7c0e * elf32-ppc.c (ppc_elf_fake_sections): Don't set SHF_EXCLUDE on
group sections.
2005-10-24 04:32:50 +00:00
H.J. Lu 60b488501c 2005-10-23 H.J. Lu <hongjiu.lu@intel.com>
* coff-rs6000.c (rs6000coff_vec): Initialize
	_bfd_init_private_section_data with
	_bfd_generic_init_private_section_data.
	(pmac_xcoff_vec): Likewise.
	* coff64-rs6000.c (rs6000coff64_vec): Likewise.
	(aix5coff64_vec): Likewise.
2005-10-24 02:50:27 +00:00
H.J. Lu ccd2ec6a87 bfd/
2005-10-23  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/1487
	* elf-bfd.h (_bfd_generic_init_private_section_data): New.
	(_bfd_elf_init_private_section_data): New.

	* elf.c (elf_fake_sections): Don't set SHF_GROUP for
	relocatable link.
	(bfd_elf_set_group_contents): Don't handle relocatable link
	specially.
	(assign_section_numbers): If it isn't called by assembler,
	use the output section of elf_linked_to_section for
	SHF_LINK_ORDER.
	(_bfd_elf_init_private_section_data): New.
	(_bfd_elf_copy_private_section_data): Call it.

	* libbfd-in.h (_bfd_generic_init_private_section_data): New.

	* libbfd.c (_bfd_generic_init_private_section_data): New.

	* targets.c (BFD_JUMP_TABLE_COPY): Add
	_bfd_generic_init_private_section_data.
	(bfd_init_private_section_data): Likewise.

	* bfd-in2.h: Regenerated.
	* libbfd.h: Likewise.

ld/

2005-10-23  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/1487
	* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Call
	bfd_match_sections_by_type to match section types.

	* ldlang.c (init_os): Take the input section. Call
	bfd_init_private_section_data if the input section isn't NULL.
	(exp_init_os): Pass NULL to init_os.
	(map_input_to_output_sections): Likewise.
	(lang_add_section): Pass the input section to init_os.

ld/testsuite/

2005-10-23  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/1487
	* ld-ia64/tlspic.rd: Updated.
2005-10-24 01:40:58 +00:00
Alan Modra 167cadb67e daily update 2005-10-24 00:00:05 +00:00
Alan Modra 60124e1830 * elf64-ppc.c (dec_dynrel_count): Don't report errors for local
syms in gc'd sections.
	(ppc64_elf_edit_opd): Don't adjust reloc counts when NO_OPD_RELOCS.
	(elf_backend_action_discarded): Define.
	(ppc64_elf_action_discarded): New function.
2005-10-23 13:12:09 +00:00
Alan Modra 307154a29f daily update 2005-10-23 00:00:06 +00:00
Alan Modra a0ffed4b33 daily update 2005-10-22 00:00:05 +00:00
Alan Modra 795ebfebad daily update 2005-10-21 00:00:13 +00:00
Alan Modra 4f4b689b07 daily update 2005-10-20 00:09:01 +00:00
Nick Clifton 44444f50d6 * elf32-arm.c (find_arm_elf_section_entry): New function.
(get_arm_elf_section_data): Use it.
  (unrecord_section_with_arm_elf_section_data): Use it.
2005-10-19 15:40:23 +00:00
Alan Modra 2ebe172e81 daily update 2005-10-19 00:00:05 +00:00
Alan Modra beabab97f0 daily update 2005-10-18 00:00:06 +00:00
Alan Modra df2ce3e5f9 daily update 2005-10-17 00:00:07 +00:00
Alan Modra 53a7c4cf13 daily update 2005-10-16 00:00:07 +00:00
H.J. Lu 66b920dc13 2005-10-15 H.J. Lu <hongjiu.lu@intel.com>
* coff-rs6000.c (rs6000coff_vec): Initialize
	_bfd_match_sections_by_type with
	_bfd_generic_match_sections_by_type.
	(pmac_xcoff_vec): Likewise.
	* coff64-rs6000.c (rs6000coff64_vec): Likewise.
	(aix5coff64_vec): Likewise.
2005-10-15 15:38:12 +00:00
H.J. Lu ecca98713a bfd/
2005-10-15  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/1467
	* elf-bfd.h (_bfd_elf_match_sections_by_type): New.
	(_bfd_generic_match_sections_by_type): New. Defined.

	* elf.c (_bfd_elf_match_sections_by_type): New.

	* libbfd-in.h (_bfd_generic_match_sections_by_type): New.

	* bfd-in2.h: Regenerated.
	* libbfd.h: Likewise.

	* libbfd.c (_bfd_generic_match_sections_by_type): New.

	* targets.c (BFD_JUMP_TABLE_LINK): Initialize
	_bfd_match_sections_by_type with
	_bfd_generic_match_sections_by_type.
	(bfd_target): Add _bfd_match_sections_by_type.

ld/

2005-10-15  H.J. Lu  <hongjiu.lu@intel.com>

	PR ld/1467
	* emultempl/elf32.em: Include "elf-bfd.h".
	(gld${EMULATION_NAME}_place_orphan): Check section type and
	don't use section name for ELF input sections.

	* ld.texinfo: Document orphan section processing.

	* ldlang.c (lang_output_section_find_by_flags): Match section
	types by calling bfd_match_sections_by_type.
2005-10-15 14:57:55 +00:00
Alan Modra ff0929e51c daily update 2005-10-15 00:00:05 +00:00
Alan Modra ce80b210f3 daily update 2005-10-14 00:00:05 +00:00
Alan Modra 4454c32763 daily update 2005-10-13 00:00:07 +00:00
Alan Modra 9e691ad0b4 daily update 2005-10-12 00:00:05 +00:00
Alan Modra 7dd98ef00d daily update 2005-10-11 00:00:05 +00:00
Alan Modra aade0c975e daily update 2005-10-10 00:00:05 +00:00
Alan Modra d9d34a62bd daily update 2005-10-09 00:00:04 +00:00
Paul Brook ee065d83ee 2005-10-08 Paul Brook <paul@codesourcery.com>
bfd/
	* elf32-arm.c: Move #include "elf/arm.h" after libbfd.h.
	(NUM_KNOWN_ATTRIBUTES): Define.
	(aeabi_attribute, aeabi_attribute_list): Define.
	(elf32_arm_obj_tdata): Add known_eabi_attributes and
	other_eabi_attributes.
	(uleb128_size, is_default_attr, eabi_attr_size,
	elf32_arm_eabi_attr_size, write_uleb128, write_eabi_attribute,
	elf32_arm_set_eabi_attr_contents, elf32_arm_bfd_final_link,
	elf32_arm_new_eabi_attr, attr_strdup, elf32_arm_add_eabi_attr_int,
	elf32_arm_add_eabi_attr_compat, copy_eabi_attributes,
	elf32_arm_merge_eabi_attributes): New functions.
	(elf32_arm_copy_private_bfd_data): Copy EABI object attributes.
	(elf32_arm_fake_sections): Handle .ARM.attributes.
	(elf32_arm_parse_attributes): New function.
	(elf32_arm_section_from_shdr): Use it.
	(bfd_elf32_bfd_final_link): Define.
gas/
	* config/tc-arm.c: Don't provide fallback default for CPU_DEFAULT.
	(arm_arch_used, thumb_arch_used, selected_cpu, selected_cpu_name):
	New variables.
	(arm_cpu_option_table): Add canonical_name.
	(arm_cpus): Populate canonical_name field.
	(s_arm_eabi_attribute, s_arm_arch, s_arm_cpu, s_arm_fpu,
	aeabi_set_public_attributes, arm_md_end): New functions.
	(md_pseudo_table): Add "cpu", "arch", "fpu" and "eabi_attribute".
	(md_assemble): Set thumb_arch_used and arm_arch_used.
	(md_begin): Set defaut cpu if CPU_DEFAULT not defined.
	* config/tc-arm.h (md_end): Define.
	* doc/c-arm.texi: Document .cpu, .arch, .fpu and .eabi_attribute.
gas/testsuite/
	* gas/arm/eabi_attr_1.s: New test.
	* gas/arm/eabi_attr_1.d: New test.
	* gas/arm/arm7t.d: Only disassemble code sections.
	* gas/arm/bignum1.d: Ignore Arm object attribute sections.
	* gas/arm/mapping.d: Ditto.
	* gas/arm/unwind.d: Ditto.
	* gas/elf/section0.d: Ditto.
	* gas/elf/section1.d: Ditto.
	* gas/elf/elf.exp: Set target_machine for Arm EABI based targets.
	* gas/elf/section2.e-armeabi: New file.
include/elf/
	* arm.h: Add prototypes for BFD object attribute routines.
ld/testsuite/
	* ld-arm/arm-rel31.d: Ignore Arm object attribute sections.
	* ld-arm/arm-target1-abs.d: Ditto.
	* ld-arm/arm-target1-rel.d: Ditto.
	* ld-arm/arm-target2-abs.d: Ditto.
	* ld-arm/arm-target2-got-rel.d: Ditto.
	* ld-arm/arm-target2-rel.d: Ditto.
2005-10-08 17:07:19 +00:00
Alan Modra 646d45ea7c daily update 2005-10-08 00:00:06 +00:00
Alan Modra 13d59a6730 daily update 2005-10-07 00:00:07 +00:00
Daniel Jacobowitz 6edfbbad08 bfd/
* elf32-arm.c (elf32_arm_check_relocs): Avoid aliasing warnings from
	GCC.
	(elf32_arm_size_dynamic_sections): Likewise.
	* ecofflink.c (bfd_ecoff_debug_one_external): Likewise.
	* elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
	* elf32-m32r.c (m32r_elf_check_relocs): Likewise.
	* elf32-m68k.c (elf_m68k_check_relocs): Likewise.
	* elf32-ppc.c (ppc_elf_check_relocs): Likewise.
	* elf32-s390.c (elf_s390_check_relocs): Likewise.
	(elf_s390_size_dynamic_sections): Likewise.
	* elf32-sh.c (sh_elf_check_relocs): Likewise.
	* elf64-ppc.c (ppc64_elf_check_relocs, dec_dynrel_count)
	(ppc64_elf_size_dynamic_sections): Likewise.
	* elf64-s390.c (elf_s390_check_relocs): Likewise.
	(elf_s390_size_dynamic_sections): Likewise.
	* elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Likewise.
	* elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
	(_bfd_sparc_elf_size_dynamic_sections): Likewise.
	* ieee.c (ieee_slurp_section_data): Likewise.
	* oasys.c (oasys_slurp_section_data): Likewise.
opcodes/
	* ppc-dis.c (struct dis_private): Remove.
	(powerpc_dialect): Avoid aliasing warnings.
	(print_insn_big_powerpc, print_insn_little_powerpc): Likewise.
2005-10-06 19:21:14 +00:00
Alan Modra af42c39620 daily update 2005-10-06 00:00:04 +00:00
Bob Wilson 1b74d0942e * archive.c: Add missing SUBSECTION for documentation.
* bfd.c: Likewise.
        * cache.c: Likewise.
        * corefile.c: Likewise.
        * format.c: Likewise.
        * init.c: Likewise.
        * libbfd.c: Likewise.
        * opncls.c: Likewise.
        * elf.c: Remove blank line after SECTION heading.
        * reloc.c: Change "howto manager" SECTION to a SUBSECTION.
2005-10-05 21:24:23 +00:00
Alan Modra 339d060c74 daily update 2005-10-05 00:00:05 +00:00