Commit Graph

4751 Commits

Author SHA1 Message Date
Nick Clifton 0facbdf5c2 * peXXigen.c (pe_print_edata): Compute the size of the export table from the
size field in the DataDictionary and not the size of the section.  Some
  linkers embed the export table inside a larger section.
2005-07-29 14:07:01 +00:00
Alan Modra 8a69675106 * elf-bfd.h (struct elf_backend_data): Add action_discarded.
(enum action_discarded): Move from..
	* elflink.c (enum action_discarded): ..here.
	(_bfd_elf_default_action_discarded): Rename from elf_action_discarded.
	Remove target specific section checks.
	(elf_link_input_bfd): Adjust.
	* elfxx-target.h (elf_backend_action_discarded): Define.
	(elfNN_bed): Init new field.
	* bfd-in.h (_bfd_elf_default_action_discarded): Declare.
	* bfd-in2.h: Regenerate.
	* elf-hppa.h (elf_hppa_action_discarded): New function.
	* elf32-hppa.c (elf_backend_action_discarded): Define.
	* elf64-hppa.c (elf_backend_action_discarded): Define.
	* elf32-ppc.c (ppc_elf_action_discarded): New function.
	(elf_backend_action_discarded): Define.
2005-07-29 02:46:04 +00:00
Alan Modra 11faf5e636 daily update 2005-07-29 00:00:10 +00:00
Alan Modra a5938ee8da daily update 2005-07-28 00:00:10 +00:00
Alan Modra 2f5028a7c8 * elflink.c (fix_syms): Handle symbols defined in input sections. 2005-07-27 08:32:53 +00:00
Jan Beulich a33d77bc5f bfd/
2005-07-27  Jan Beulich  <jbeulich@novell.com>

	* elf64-x86-64.c (R_X86_64_standard, R_X86_64_vt_offset): New.
	(elf64_x86_64_info_to_howto): Use them.
2005-07-27 07:01:30 +00:00
Alan Modra a39b090394 daily update 2005-07-27 00:00:06 +00:00
Alan Modra f41d945bae * elflink.c (_bfd_elf_merge_symbol): Skip weak redefinition
regardless of strength of previous definition.
2005-07-26 15:19:37 +00:00
Alan Modra 87538722be * elflink.c (elf_gc_mark_dynamic_ref_symbol): Handle -shared.
(bfd_elf_gc_sections): Allow -gc-sections when -shared.
	* elf32-ppc.c (ppc_elf_gc_sweep_hook): Correct for -shared.
2005-07-26 12:06:38 +00:00
Alan Modra 9e8cc8b4bf * elflink.c (elf_gc_sweep): Move gcc_except_table code..
(bfd_elf_gc_sections): ..to here.
2005-07-26 11:47:05 +00:00
DJ Delorie fd54057a29 [bfd]
* reloc.c: Remove unused M32C relocs, add BFD_RELOC_M32C_HI8.
	* libbfd.h: Regenerate.
	* bfd-in2.h: Regenerate.

	* elf32-m32c.c (m32c_elf_howto_table): Add R_M32C_8, R_M32C_LO16,
	R_M32C_HI8, R_M32C_HI16.
	(m32c_reloc_map): Likewise.
	(m32c_elf_relocate_section): Add R_M32C_HI8 and R_M32C_HI16.

[cpu]
	* m32c.opc (parse_unsigned8): Add %dsp8().
	(parse_signed8): Add %hi8().
	(parse_unsigned16): Add %dsp16().
	(parse_signed16): Add %lo16() and %hi16().
	(parse_lab_5_3): Make valuep a bfd_vma *.

[gas]
	* config/tc-m32c.c (md_cgen_lookup_reloc): Add 8 bit operands.
	Support %mod() modifiers from opcodes.
	* doc/c-m32c.texi (M32C-Modifiers): New section.

[include/elf]

	* m32c.h: Add R_M32C_8, R_M32C_LO16, R_M32C_HI8, and R_M32C_HI16.

[opcodes]
	* m32c-asm.c Regenerate.
	* m32c-dis.c Regenerate.
2005-07-26 03:21:53 +00:00
Alan Modra 030cf60a5d daily update 2005-07-26 00:00:05 +00:00
H.J. Lu 3b22753a67 bfd/
2005-07-25  Jan Hubicka  <jh@suse.cz>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* elf-bfd.h (_bfd_elf_large_com_section): New.
	* elf.c (_bfd_elf_large_com_section): New. Defined.

	* elf64-x86-64.c (elf64_x86_64_add_symbol_hook): New.
	(elf64_x86_64_elf_section_from_bfd_section): New.
	(elf64_x86_64_symbol_processing): New.
	(elf64_x86_64_common_definition): New.
	(elf64_x86_64_common_section_index): New.
	(elf64_x86_64_common_section): New.
	(elf64_x86_64_merge_symbol): New.
	(elf64_x86_64_additional_program_headers): New.
	(elf64_x86_64_special_sections): New.
	(elf_backend_section_from_bfd_section): New. Defined.
	(elf_backend_add_symbol_hook): Likewise.
	(elf_backend_common_section_index): Likewise.
	(elf_backend_common_section): Likewise.
	(elf_backend_common_definition): Likewise.
	(elf_backend_merge_symbol): Likewise.
	(elf_backend_special_sections): Likewise.
	(elf_backend_additional_program_headers): Likewise.

binutils/

2005-07-25  H.J. Lu  <hongjiu.lu@intel.com>

	* readelf.c (dump_relocations): Handle SHN_X86_64_LCOMMON.
	(get_symbol_index_type): Likewise.
	(get_elf_section_flags): Handle SHF_X86_64_LARGE.

gas/

2005-07-25  Jan Hubicka  <jh@suse.cz>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* config/obj-elf.c: Include "elf/x86-64.h" if TC_I386 is
	defined.
	(elf_com_section_ptr): New.
	(elf_begin): Set elf_com_section_ptr to bfd_com_section_ptr.
	(elf_common_parse): Make it global. Use elf_com_section_ptr
	instead of bfd_com_section_ptr.
	(obj_elf_change_section): Handle x86-64 large bss sections.

	* config/obj-elf.h (elf_com_section_ptr): New.
	(elf_common_parse): New.

	* config/tc-i386.c (handle_large_common): New.
	(md_pseudo_table): Add "largecomm".
	(x86_64_section_letter): New.
	(x86_64_section_word): New.

	* config/tc-i386.h (x86_64_section_word): New.
	(x86_64_section_letter): New.
	(md_elf_section_letter): New. Defined.
	(md_elf_section_word): Likewise.

include/elf/

2005-07-25  Jan Hubicka  <jh@suse.cz>

	* x86-64.h (SHN_X86_64_LCOMMON): New.
	(SHF_X86_64_LARGE): New.

ld/

2005-07-25  Jan Hubicka  <jh@suse.cz>
	    H.J. Lu  <hongjiu.lu@intel.com>

	* emulparams/elf_x86_64.sh (LARGE_SECTIONS): New.

	* scripttempl/elf.sc: Updated for large section support.
2005-07-25 15:41:08 +00:00
H.J. Lu a4d8e49b50 2005-07-25 H.J. Lu <hongjiu.lu@intel.com>
* elf-bfd.h (elf_backend_data): Add common_definition,
	common_section_index, common_section, and merge_symbol.
	(_bfd_elf_common_definition): New.
	(_bfd_elf_common_section_index): New.
	(_bfd_elf_common_section): New.

	* elf.c (elf_fake_sections): Don't clear sh_flags.

	* elflink.c (_bfd_elf_merge_symbol): Call backend merge_symbol
	if it is available.
	(is_global_data_symbol_definition): Call backend
	common_definition instead of checking SHN_COMMON.
	(elf_link_add_object_symbols): Likewise.
	(elf_link_output_extsym): Call backend common_section_index
	for common section index.
	(_bfd_elf_common_definition): New.
	(_bfd_elf_common_section_index): New.
	(_bfd_elf_common_section): New.

	* elfxx-target.h (elf_backend_common_definition): New.
	(elf_backend_common_section_index): New.
	(elf_backend_common_section): New.
	(elf_backend_merge_symbol): New.
	(elfNN_bed): Initialize common_definition, common_section_index,
	common_section, and merge_symbol.

	* section.c (BFD_FAKE_SECTION): New.
	(STD_SECTION): Use it.
	* bfd-in2.h: Regenerated.
2005-07-25 15:35:37 +00:00
Alan Modra 314c531dba daily update 2005-07-25 00:00:09 +00:00
Daniel Jacobowitz 99356e9020 * chew.c: Include <string.h>. 2005-07-24 16:57:42 +00:00
Alan Modra 12fc67c63b daily update 2005-07-24 00:00:07 +00:00
H.J. Lu 58ac56d0c8 2005-07-23 Olaf Hering <olh@suse.de>
* elflink.c (elf_link_input_bfd): Add '\n' for linker einfo
	callback.
2005-07-23 15:42:51 +00:00
Alan Modra dbb467de43 daily update 2005-07-23 00:00:06 +00:00
DJ Delorie d4ad1cbf1d * chew.c: Include stdlib.h. 2005-07-22 23:54:56 +00:00
Kazu Hirata d8bacf76e8 * chew.c: Don't include sysdep.h. 2005-07-22 18:16:17 +00:00
Nick Clifton 9f971fcbd4 Remove special case handling for rtems targets that are sufficiently handled by
the default rtems targets.
2005-07-22 10:34:30 +00:00
Nick Clifton a9b7b1745d (m32r_elf_check_relocs): Fix pc count for R_M32R_REL32. 2005-07-22 10:27:44 +00:00
Alan Modra 9ed9428b13 daily update 2005-07-22 00:00:07 +00:00
Ben Elliston 240a342512 bfd/
* Makefile.am (BFD32_BACKENDS): Remove cf-m68klynx.lo.
	(BFD32_BACKENDS): Likewise, remove m68klynx.lo.
	(BFD32_BACKENDS_CFILES): Remove cf-m68klynx.c, m68klynx.c.
	(cf-m68klynx.lo, m68klynx.lo): Remove targets.
	* Makefile.in: Regenerate.
	* cf-m68klynx.c: Remove.
	* m68klynx.c: Likewise.
	* configure.in (m68klynx_aout_vec): Remove vector.
	(m68klynx_coff_vec): Likewise.
	* configure: Regenerate.
	* targets.c (m68klynx_aout_vec): Remove extern.
	(m68klynx_coff_vec): Likewise.
	(_bfd_target_vector): Remove m68klynx_{aout,coff}_vec.
	* po/SRC-POTFILES.in: Remove cf-m68klynx.c, m68klynx.c.
gas/
	* config/tc-m68k.h: Remove TE_LYNX conditional code.
2005-07-21 13:23:37 +00:00
Alan Modra 363fad39b4 daily update 2005-07-21 00:00:07 +00:00
Nick Clifton 157e7bd196 Add support for a 32bit PC relative reloc 2005-07-20 11:35:03 +00:00
Alan Modra 4e95af6201 daily update 2005-07-20 00:00:18 +00:00
Nick Clifton 85da3a565d Add ChangeLog entries for yesterdays deltas (oops!) 2005-07-19 10:01:32 +00:00
Alan Modra 51bd292c45 daily update 2005-07-19 00:00:06 +00:00
Nick Clifton e729279b04 Fix building for MS1 and M32C.
Restore alpha- sorting to the architecture tables.
2005-07-18 14:13:36 +00:00
Jan Beulich ac2aa337d3 bfd/
2005-07-18  Jan Beulich  <jbeulich@novell.com>

	* elf32-i386.c (elf_howto_table): Adjust overflow complaint handler
	for R_386_PC16.
	* elf64-x86-64.c (x86_64_elf_howto_table): Adjust overflow complaint
	handler for R_X86_64_PC16, R_X86_64_8, and R_X86_64_DTPOFF.

ld/testsuite/
2005-07-18  Jan Beulich  <jbeulich@novell.com>

	* ld-i386/abs.s, ld-i386/zero.s, ld-i386/abs.d, ld-x86-64/abs.d,
	ld-i386/pcrel16.s, ld-i386/pcrel16.d, ld-x86-64/pcrel16.d,
	ld-i386/pcrel8.s, ld-i386/pcrel8.d, ld-x86-64/pcrel8.d: New.
	* ld-i386/i386.exp, ld-x86-64/x86-64.exp: Run new tests.
2005-07-18 06:23:40 +00:00
Alan Modra 64f611c437 daily update 2005-07-18 00:00:06 +00:00
Alan Modra be7993a6c5 daily update 2005-07-17 00:00:11 +00:00
Eric Botcazou 9a20ed6e90 Fix typo in the date. 2005-07-16 15:21:10 +00:00
Eric Botcazou cc86ff917d PR ld/1021
PR ld/1031
	* elflink.c (elf_link_add_object_symbols): Also append the version
	name to non-hidden absolute symbols that are functions.
2005-07-16 15:08:14 +00:00
Alan Modra 42fa7765a2 bfd/
* elf32-ppc.c (ppc_elf_set_sdata_syms): Return void.  Remove hack
	for zero size sections.  Don't set .sbss syms here.
	* elf32-ppc.h (ppc_elf_set_sdata_syms): Adjust prototype.
ld/
	* emultempl/elf32.em (gld*_provide_init_fini_syms): Prototype.
	(gld*_before_allocation): Call ldemul_do_assignments rather than
	gld*_provide_init_fini_syms directly.
	* emultempl/ppc32elf.em (gld*_after_allocation): Delete.
	(ppc_do_assignments): New function.
	(LDEMUL_AFTER_ALLOCATION): Don't define.
	(LDEMUL_DO_ASSIGNMENTS): Define.
2005-07-16 03:30:24 +00:00
Alan Modra 0f82ff91a0 bfd/
* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
opcodes/
	* Makefile.am: Run "make dep-am".
	(stamp-m32c): Fix cpu dependencies.
	* Makefile.in: Regenerate.
	* ip2k-dis.c: Regenerate.
binutils/
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
gas/
	* Makefile.am: Run "make dep-am".
	* Makefile.in: Regenerate.
ld/
	* Makefile.am: Run "make dep-am".
	(emipsidt.c, emipsidtl.c): Depend on generic.em.
	* Makefile.in: Regenerate.
2005-07-16 02:03:55 +00:00
Alan Modra 103aff3326 daily update 2005-07-16 00:00:08 +00:00
Bob Wilson 2db662bee4 * elf32-xtensa.c (vsprint_msg): Add prototype.
(build_encoding_error_message): Delete.  Code moved into....
        (elf_xtensa_do_reloc): ....here, and changed to give better
        error messages for out of range literals.
2005-07-15 20:43:37 +00:00
Alan Modra eaae8ded62 * elflink.c (bfd_elf_record_link_assignment): Remove output_bfd param.
(_bfd_elf_provide_symbol): Allow redefinition of weak syms and those
	defined in output sections.  Call bfd_elf_record_link_assignment.
	* bfd-in.h (bfd_elf_record_link_assignment): Update prototype.
	* bfd-in2.h: Regenerate.
2005-07-15 12:18:01 +00:00
Alan Modra a0aae17c63 daily update 2005-07-15 00:00:06 +00:00
Jim Blandy 49f58d10f8 ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	* configure.in: Add cases for Renesas m32c.
	* configure: Regenerated.

bfd/ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	Add support for m32c-*-elf (Renesas m32c and m16c).
	* Makefile.am (ALL_MACHINES): Add cpu-m32c.lo.
	(ALL_MACHINES_CFILES): Add cpu-m32c.c.
	(BFD32_BACKENDS): Add elf32-m32c.lo.
	(BFD32_BACKENDS_CFILES): Add elf32-m32c.c.
	(cpu-m32c.lo, elf32-m32c.lo): New rules, generated by 'make dep-am'.
	* Makefile.in: Regenerated.
	* archures.c (bfd_arch_m32c, bfd_mach_m16c, bfd_mach_m32c): New
	arch and mach codes.
	(bfd_m32c_arch): New arch info object.
	(bfd_archures_list): List bfd_m32c_arch.
	* bfd-in2.h: Regenerated.
	* config.bfd: Add case for the m32c.
	* configure.in: Add case for the m32c.
	* configure: Regenerated.
	* cpu-m32c.c, elf32-m32c.c: New files.
	* libbfd.h: Regenerated.
	* targets.c (bfd_elf32_m32c_vec): Declare.
	(_bfd_target_vector): List bfd_elf32_m32c_vec.

binutils/ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	* readelf.c: #include "elf/m32c.h"
	(guess_is_rela, dump_relocations, get_machine_name): Add cases for
	EM_M32C.
	* Makefile.am (readelf.o): Update dependencies.
	* Makefile.in: Regenerated.

cpu/ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	* m32c.cpu, m32c.opc: Machine description for the Renesas M32C.

gas/ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	Add support for the Renesas M32C.
	* Makefile.am (CPU_TYPES): List m32c.
	(TARGET_CPU_CFILES): List config/tc-m32c.c.
	(TARGET_CPU_HFILES): List config/tc-m32c.h.
	* configure.in: Add case for m32c.
	* configure.tgt: Add cases for m32c and m32c-*-elf.
	* configure: Regenerated.
	* config/tc-m32c.c, config/tc-m32c.h: New files.
	* doc/Makefile.am (CPU_DOCS): Add c-m32c.texi.
	* doc/Makefile.in: Regenerated.
	* doc/all.texi: Set M32C.
	* doc/as.texinfo: Add text for the M32C-specific options and line
	comment characters, and refer to c-m32c.texi.
	* doc/c-m32c.texi: New file.

include/ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	* dis-asm.h (print_insn_m32c): New declaration.

include/elf/ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	Add support for Renesas M32C and M16C.
	* common.h (EM_M32C): New machine number.
	* m32c.h: New file.

ld/ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	Add support for the Renesas M32C and M16C.
	* Makefile.am (ALL_EMULATIONS): Add eelf32m32c.o.
	(eelf32m32c.c): New target.
	* Makefile.in: Regenerated.
	* configure.tgt: Add case for m32c-*-elf.
	* emulparams/elf32m32c.sh: New file.

opcodes/ChangeLog:
2005-07-14  Jim Blandy  <jimb@redhat.com>

	Add support for the Renesas M32C and M16C.
	* m32c-asm.c, m32c-desc.c, m32c-dis.c, m32c-ibld.c, m32c-opc.c: New.
	* m32c-desc.h, m32c-opc.h: New.
	* Makefile.am (HFILES): List m32c-desc.h and m32c-opc.h.
	(CFILES): List m32c-asm.c, m32c-desc.c, m32c-dis.c, m32c-ibld.c,
	m32c-opc.c.
	(ALL_MACHINES): List m32c-asm.lo, m32c-desc.lo, m32c-dis.lo,
	m32c-ibld.lo, m32c-opc.lo.
	(CLEANFILES): List stamp-m32c.
	(M32C_DEPS): List stamp-m32c, if CGEN_MAINT.
	(CGEN_CPUS): Add m32c.
	(m32c-asm.c, m32c-desc.c, m32c-dis.c, m32c-ibld.c, m32c-opc.c)
	(m32c-desc.h, m32c-opc.h): Depend on M32C_DEPS.
	(m32c_opc_h): New variable.
	(stamp-m32c, m32c-asm.lo, m32c-desc.lo, m32c-dis.lo, m32c-ibld.lo)
	(m32c-opc.lo): New rules.
	* Makefile.in: Regenerated.
	* configure.in: Add case for bfd_m32c_arch.
	* configure: Regenerated.
	* disassemble.c (ARCH_m32c): New.
	[ARCH_m32c]: #include "m32c-desc.h".
	(disassembler) [ARCH_m32c]: Add case for bfd_arch_m32c.
	(disassemble_init_for_target) [ARCH_m32c]: Same.

	* cgen-ops.h, cgen-types.h: New files.
	* Makefile.am (HFILES): List them.
	* Makefile.in: Regenerated.
2005-07-14 22:52:28 +00:00
Alan Modra a3c2b96af6 bfd/
* bfd-in.h (_bfd_elf_fix_excluded_sec_syms): Declare.
	(_bfd_elf_provide_section_bound_symbols): Remove param name.
	Formatting.
	* bfd-in2.h: Regenerate.
	* elflink.c (bfd_elf_gc_sections): Don't call generic function.
	(_bfd_elf_provide_symbol): Formatting.
	(_bfd_elf_provide_section_bound_symbols): Remove all hacks, just
	create section relative syms.
	(fix_syms, _bfd_elf_fix_excluded_sec_syms): New functions.
	* elf32-ppc.c (ppc_elf_set_sdata_syms): Use
	_bfd_elf_provide_section_bound_symbols.
	* reloc.c (bfd_mark_used_section): Delete.
	(bfd_generic_gc_sections): Don't call the above.
ld/
	* ldlang.c (strip_excluded_output_sections): Don't call
	bfd_gc_sections.
	* emultempl/elf32.em (gld*_provide_bound_symbols): Move.
	(gld*_provide_init_fini_syms): Move.
	(gld*_before_allocation): Call the above from here..
	(gld*_finish): ..not here.  Call _bfd_elf_fix_excluded_sec_syms.
	* emultempl/hppaelf.em (hppaelf_finish): Likewise.
	* emultempl/ppc64elf.em (ppc_finish): Likewise.
2005-07-14 13:54:23 +00:00
Nick Clifton bfaaa3c28b Fix spelling typo in comment 2005-07-14 07:48:28 +00:00
Nick Clifton cb4aa4730f Add PR number for the last ChangeLog entry. 2005-07-14 07:22:37 +00:00
Nick Clifton 1787c3409c (bfd_last_cache): Initialise to NULL. 2005-07-14 07:22:02 +00:00
Nick Clifton 15ac1d4f68 Add code to detect and either handle or issue an error message for binaries
created by the DEC ALPHA compilers.
2005-07-14 07:07:46 +00:00
Alan Modra 23305d89a3 daily update 2005-07-14 00:00:07 +00:00
Steve Ellcey d49093754d * bfd.m4 (BFD_NEED_DECLARATION): Remove. 2005-07-13 21:19:13 +00:00