Commit graph

3676 commits

Author SHA1 Message Date
Daniel Jacobowitz
8528d62e32 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
the pre-existing section.
2004-06-17 02:27:12 +00:00
Alan Modra
ee9473b3ef daily update 2004-06-17 00:00:09 +00:00
Alan Modra
89c0e8b4ce daily update 2004-06-16 00:00:07 +00:00
Alan Modra
911d08a746 * section.c (struct sec): Remove usused flags. Reorganize a little.
(bfd_get_section_size_before_reloc): Delete.
	(bfd_get_section_size_after_reloc): Delete.
	(STD_SECTION): Update.
	(bfd_get_section_size_now): Delete.
	(bfd_set_section_contents): Don't referece reloc_done.
	(bfd_get_section_contents): Remove reloc_done comment.
	* bout.c (b_out_bfd_get_relocated_section_contents): Don't set
	reloc_done.
	* coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
	* ecoff.c (bfd_debug_section): Update initializer.
	* elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
	* reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
	* bfd-in.h (bfd_section_size): Expand.
	(bfd_get_section_size): New macro.
	* bfd-in2.h: Regenerate.
	* coff64-rs6000.c (xcoff64_write_object_contents): Replace
	bfd_get_section_size_before_reloc with bfd_get_section_size.
	* coffcode.h (coff_write_object_contents): Likewise.
	* coffgen.c (build_debug_section): Likewise.
	* dwarf1.c (parse_line_table): Likewise.
	(_bfd_dwarf1_find_nearest_line): Likewise.
	* ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
	* i386msdos.c (msdos_write_object_contents): Likewise.
	* pdp11.c (squirt_out_relocs): Likewise.
	* elf32-sh64.c (sh64_find_section_for_address): Remove comment.
	* elf64-mmix.c (mmix_elf_final_link): Update comment.
2004-06-15 01:24:22 +00:00
Alan Modra
a4233a84bd daily update 2004-06-15 00:00:06 +00:00
Chris Demetriou
092dcd755d [ bfd/ChangeLog ]
2004-06-14  Chris Demetriou  <cgd@broadcom.com>

        * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
        removal) with updated comment.
        (bfd_elf32_bfd_reloc_type_lookup): Add back case for
        BFD_RELOC_32_PCREL.
        (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
        * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.

[ include/elf/ChangeLog ]
2004-06-14  Chris Demetriou  <cgd@broadcom.com>

        * mips.h (R_MIPS_PC32): Add back (undoing removal on 2004-04-24),
        with an updated comment.
2004-06-14 18:25:10 +00:00
Alan Modra
e9081f5778 daily update 2004-06-14 00:00:07 +00:00
Alan Modra
c3567b45bf daily update 2004-06-13 00:00:06 +00:00
Alan Modra
3ffa5234cb * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
overflow on branches to undefweaks.
2004-06-12 11:30:10 +00:00
Alan Modra
2d92b4e163 daily update 2004-06-12 00:00:07 +00:00
Maciej W. Rozycki
e9edc8084b * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
as ecoff_section_data() does not return a valid lvalue.
2004-06-11 14:19:32 +00:00
Alan Modra
0a4695466c daily update 2004-06-11 00:00:10 +00:00
Alexandre Oliva
a9b881beb1 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
(elf_link_add_object_symbols): Likewise.
2004-06-09 13:49:04 +00:00
Alexandre Oliva
a873f25a22 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
(elf_backend_reloc_type_class): New.
2004-06-09 08:31:28 +00:00
Mark Kettenis
eef0f186e0 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
netbsd-core.lo.
* configure: Regenerate.
2004-06-08 07:39:37 +00:00
Alan Modra
3797566efc daily update 2004-06-08 00:00:13 +00:00
Daniel Jacobowitz
822392cef5 From: Albert Chin-A-Young <china@thewrittenword.com>
* bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
	to unsigned int.
2004-06-07 15:29:53 +00:00
Alan Modra
6a85f5bce0 daily update 2004-06-07 00:00:06 +00:00
Alan Modra
cec27695dd daily update 2004-06-06 00:00:06 +00:00
Alan Modra
c0a2780477 daily update 2004-06-05 00:00:06 +00:00
Alan Modra
d4a00f218b daily update 2004-06-04 00:00:13 +00:00
Alan Modra
3baf1c7d03 daily update 2004-06-01 00:00:11 +00:00
Alan Modra
19385435b2 daily update 2004-05-31 00:00:06 +00:00
Alan Modra
0c8434a4e0 daily update 2004-05-30 00:00:06 +00:00
H.J. Lu
9f2e92c5ac 2004-05-29 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
	change.
2004-05-29 19:25:54 +00:00
DJ Delorie
dd90f1b254 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
for linking, but otherwise adjust reloc for merged sections.
2004-05-28 21:33:35 +00:00
H.J. Lu
5dd23ec18b 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
	_bfd_merged_section_offset for local symbols.
2004-05-28 20:30:29 +00:00
Joern Rennecke
f6f9408fbf 2004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
bfd:
	* Makefile.am: Regenerate dependencies.
	* Makefile.in: Regenerate.
	* archures.c: Add bfd_mach_sh3_nommu .
	* bfd-in2.h: Regenerate.
	* cpu-sh.c: Add sh3-nommu architecture.
	(bfd_to_arch_table): Create new table.
	(sh_get_arch_from_bfd_mach): Create new function.
	(sh_get_arch_up_from_bfd_mach): Create new function.
	(sh_merge_bfd_arch): Create new function.
	* elf32-sh.c (sh_ef_bfd_table): Add table.
	(sh_elf_check_relocs): Replace switch statement with
	use of sh_ef_bfd_table .
	(sh_elf_get_flags_from_mach): Add new function.
	(sh_find_elf_flags): Likewise.
	(sh_elf_copy_private_data): Replace most of non-elf contents
	with a call to sh_merge_bfd_arch() .

gas:
	* Makefile.am: Regenerate dependecies.
	* Makefile.in: Regenerate.
	* config/tc-sh.c (valid_arch): Make unsigned.
	(preset_target_arch): Likewise.
	(md_begin): Use new architecture flags system.
	(get_specific): Likewise.
	(assemble_ppi): Likewise.
	(md_assemble): Likewise. Also fix error check for bad opcodes.
	(md_parse_option): Likewise. Also generate -isa values according
	to the table in bfd/cpu-sh.c instead of just constants. Also
	allow <arch>-up ISA variants.
	(sh_elf_final_processing): Replace if-else chain with a call to
	sh_find_elf_flags().
	* testsuite/gas/sh/arch: New directory.
	* testsuite/gas/sh/arch/arch.exp: New test script.
	* testsuite/gas/sh/arch/arch_expected.txt: New file.
	* testsuite/gas/sh/arch/sh.s: New file.
	* testsuite/gas/sh/arch/sh2.s: New file.
	* testsuite/gas/sh/arch/sh-dsp.s: New file.
	* testsuite/gas/sh/arch/sh2e.s: New file.
	* testsuite/gas/sh/arch/sh3-nommu.s: New file.
	* testsuite/gas/sh/arch/sh3.s: New file.
	* testsuite/gas/sh/arch/sh3-dsp.s: New file.
	* testsuite/gas/sh/arch/sh3e.s: New file.
	* testsuite/gas/sh/arch/sh4-nommu-nofpu.s: New file.
	* testsuite/gas/sh/arch/sh4-nofpu.s: New file.
	* testsuite/gas/sh/arch/sh4.s: New file.
	* testsuite/gas/sh/arch/sh4a-nofpu.s: New file.
	* testsuite/gas/sh/arch/sh4al-dsp.s: New file.
	* testsuite/gas/sh/arch/sh4a.s: New file.

include/elf:
	* sh.h (EF_SH_HAS_DSP): Remove.
	(EF_SH_HAS_FP): Remove.
	(EF_SH_MERGE_MACH): Remove.
	(EF_SH4_NOFPU): Convert to decimal.
	(EF_SH4A_NOFPU): Likewise.
	(EF_SH4_NOMMU_NOFPU): Likewise.
	(EF_SH3_NOMMU): Add new macro.
	(EF_SH_BFD_TABLE): Likewise.
	(sh_find_elf_flags): Add prototype.
	(sh_elf_get_flags_from_mach): Likewise.

opcodes:
	* sh-dis.c (target_arch): Make unsigned.
	(print_insn_sh): Replace (most of) switch with a call to
	sh_get_arch_from_bfd_mach(). Also use new architecture flags system.
	* sh-opc.h: Redefine architecture flags values.
	Add sh3-nommu architecture.
	Reorganise <arch>_up macros so they make more visual sense.
	(SH_MERGE_ARCH_SET): Define new macro.
	(SH_VALID_BASE_ARCH_SET): Likewise.
	(SH_VALID_MMU_ARCH_SET): Likewise.
	(SH_VALID_CO_ARCH_SET): Likewise.
	(SH_VALID_ARCH_SET): Likewise.
	(SH_MERGE_ARCH_SET_VALID): Likewise.
	(SH_ARCH_SET_HAS_FPU): Likewise.
	(SH_ARCH_SET_HAS_DSP): Likewise.
	(SH_ARCH_UNKNOWN_ARCH): Likewise.
	(sh_get_arch_from_bfd_mach): Add prototype.
	(sh_get_arch_up_from_bfd_mach): Likewise.
	(sh_get_bfd_mach_from_arch_set): Likewise.
	(sh_merge_bfd_arc): Likewise.

ld:
	* testsuite/ld-sh/arch/arch.exp: New test script.
	* testsuite/ld-sh/arch/arch_expected.txt: New file.
	* testsuite/ld-sh/arch/sh.s: New file.
	* testsuite/ld-sh/arch/sh2.s: New file.
	* testsuite/ld-sh/arch/sh-dsp.s: New file.
	* testsuite/ld-sh/arch/sh2e.s: New file.
	* testsuite/ld-sh/arch/sh3-nommu.s: New file.
	* testsuite/ld-sh/arch/sh3.s: New file.
	* testsuite/ld-sh/arch/sh3-dsp.s: New file.
	* testsuite/ld-sh/arch/sh3e.s: New file.
	* testsuite/ld-sh/arch/sh4-nommu-nofpu.s: New file.
	* testsuite/ld-sh/arch/sh4-nofpu.s: New file.
	* testsuite/ld-sh/arch/sh4.s: New file.
	* testsuite/ld-sh/arch/sh4a-nofpu.s: New file.
	* testsuite/ld-sh/arch/sh4al-dsp.s: New file.
	* testsuite/ld-sh/arch/sh4a.s: New file.
2004-05-28 12:32:10 +00:00
Alan Modra
1fc2533bde daily update 2004-05-28 00:00:09 +00:00
Michael Chastain
d866f350ab 2004-05-27 Michael Chastain <mec.gnu@mindspring.com>
* Makefile.am (bfdver.h): Use explicit filename, not $< .
	* Makefile.in: Regenerate.
2004-05-27 21:22:49 +00:00
Alexandre Oliva
1055df0f95 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
custom calling conventions for dynamic symbols.
(mn10300_elf_relax_section): Avoid relaxing a function as a local
symbol if it's an alias to a global one.
2004-05-27 06:22:54 +00:00
H.J. Lu
b309625038 bfd/
2004-05-26  H.J. Lu  <hongjiu.lu@intel.com>

	* elf.c (_bfd_elf_make_section_from_shdr): Undo the last
	change.

ld/

2004-05-26  H.J. Lu  <hongjiu.lu@intel.com>

	* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Clear
	SEC_EXCLUDE on non-SEC_DEBUGGING sections for relocatable link.
	* ldlang.c (lang_add_section): Likewise.
2004-05-27 05:53:36 +00:00
Alexandre Oliva
9bb351fd9c * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
loop over hashes.
2004-05-27 04:07:41 +00:00
Alan Modra
d4e145e024 daily update 2004-05-27 00:00:05 +00:00
Alan Modra
e49f502242 bfd/
* elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
	for SHT_GROUP sections.
ld/
	* ldlang.c (lang_add_section): Set SEC_EXCLUDE for SEC_GROUP
	sections when doing a final link.  Clear SEC_EXCLUDE when doing
	a relocable link, except for SEC_DEBUGGING sections.
	* emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Use the
	same condition here to drop SEC_EXCLUDE orphan sections.
2004-05-26 10:23:51 +00:00
Alan Modra
5f31302fbf daily update 2004-05-26 00:00:07 +00:00
Alan Modra
57ceae9483 bfd/
* elflink.c (elf_link_add_object_symbols): Don't set up merge
	section data here..
	* elf.c (_bfd_elf_merge_sections): .. Do it here instead.
	* merge.c: Formatting.  Remove unnecessary casts.  Expand
	bfd_get_section_alignment macro.
	(struct sec_merge_sec_info): Rename "first" to "first_str".  Update
	use throughout file.
	(_bfd_add_merge_section): Rename from _bfd_merge_section.  Update
	comment.  Abort on dynamic or non-SEC_MERGE input.  Don't test
	section name to determine sinfo group, instead test output section
	and alignment.
	(_bfd_merge_sections): Add struct bfd_link_info param.  Call
	_bfd_strip_section_from_output rather than just twiddling flags.
	* libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
	(_bfd_merge_sections): Update prototype.
	* libbfd.h: Regenerate.
ld/
	* ldlang.c (lang_process): Call bfd_merge_sections later, and
	only when not a relocatable link.
	(print_input_section): Handle SEC_EXCLUDE sections.
	(size_input_section): Don't update dot on SEC_EXCLUDE sections.
	(lang_do_assignments_1): Likewise.
	* ldwrite.c (build_link_order): Ignore SEC_EXCLUDE input sections.
	* emultempl/armelf.em (arm_elf_set_bfd_for_interworking): Likewise.
	* emultempl/hppaelf.em (build_section_lists): Likewise.
	* emultempl/ppc64elf.em (build_toc_list): Likewise.
	(build_section_lists): Likewise.
2004-05-25 06:33:51 +00:00
Alan Modra
f021ea9c68 daily update 2004-05-25 00:00:07 +00:00
Mark Kettenis
d34436e841 * netbsd-core.c: Correctly indent section that sets architecture
from machine ID.
2004-05-24 21:52:38 +00:00
Mark Kettenis
2b6a3be6c8 Really add this file. 2004-05-24 16:09:10 +00:00
Nick Clifton
c6f8758fa0 Add support for an m88k-openbsd target 2004-05-24 14:48:18 +00:00
Nick Clifton
7d7e6bc475 Remove bogus inode 2004-05-24 07:49:10 +00:00
Alan Modra
20135044c7 daily update 2004-05-24 00:00:06 +00:00
Ben Elliston
bc286f95ec * configure.in (is_release): Remove.
(bfd_version_date, bfd_version, bfd_version_string): Likewise.
	(AC_OUTPUT): Don't output bfdver.h from version.h.
	* configure: Regenerate.
	* Makefile.am (RELEASE): New variable.
	(bfdver.h): New target.
	* Makefile.in: Regenerate.
	* doc/Makefile.in: Likewise.
2004-05-23 00:06:49 +00:00
Alan Modra
fb90c1aa1f daily update 2004-05-23 00:00:06 +00:00
Ben Elliston
8b89a4eb74 * Makefile.am (config.status): Don't depend on version.h.
* Makefile.in: Regenerate.
2004-05-22 06:06:22 +00:00
Alan Modra
753731eef0 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
* libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
	* libbfd.h: Regenerate.
	* elf.c (_bfd_elf_rela_local_sym): Adjust call.
	(_bfd_elf_rel_local_sym): Likewise.
	* elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
	(elf_link_input_bfd): Likewise.
	* elf32-ppc.c (ppc_elf_relax_section): Likewise.
	* elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
	* elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
	(elfNN_ia64_relocate_section): Likewise.
2004-05-22 01:56:31 +00:00
Alan Modra
6f3f9b82aa daily update 2004-05-22 00:00:10 +00:00
Nick Clifton
2d643429de Add --hash-size switch to the linker 2004-05-21 15:38:04 +00:00
Mark Kettenis
8377c19cc4 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
* netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
arm, m68k, m88k and hppa core files.
2004-05-21 14:56:07 +00:00