Commit Graph

2160 Commits

Author SHA1 Message Date
Nick Clifton e7bd9ea00e (output_file_create): Report the target format chosen when bfd_openw reports
that it is invalid.
2004-07-06 16:42:04 +00:00
Nick Clifton d98956497e (coff_pseudo_table): Only define the weak pseudo for BFD based assemblers. 2004-07-06 15:30:26 +00:00
Joern Rennecke 871ec89609 2004-06-30 Andrew Stubbs <andrew.stubbs@superh.com>
bfd:
	* elf32-sh.c: Include ../opcodes/sh-opc.h .
	* Makefile.am: Ran make dep-am .
	* Makefile.in: Ran make dep-in .

	gas:
	* config/tc-sh.c (md_assemble): Change isspace to ISSPACE.
	(md_parse_option): Remove redundant -isa testing.
	Make bfd_arch variable const.
	(md_show_usage): Make bfd_arch variable const.
2004-07-05 13:35:44 +00:00
Jim Wilson 5a9ff93dab Emit error for unaligned instructions.
* config/tc-ia64.c (emit_one_bundle): Check and set insn_addr.
	* config/tc-ia64.h (md_frag_check): Define.
2004-07-04 00:29:21 +00:00
Christopher Faylor c87db184a7 2004-07-04 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
* bfd/cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
externals properly.
* src/gas/config/obj-coff.c (obj_coff_weak): New .weak syntax for PE weak
externals.
* binutils/doc/binutils.texi (nm): Clarify weak symbol description.
* gas/config/tc-i386.c (tc_gen_reloc): Use addend for weak symbols in TE_PE.
* gas/doc/as.texinfo (Weak): Document PE weak symbols.
* ld/ld.texinfo (WIN32): Document PE weak symbols.
2004-07-03 16:07:51 +00:00
Richard Sandiford 3b91255ea0 * config/tc-mips.c (HAVE_IN_PLACE_ADDENDS): New macro.
(reloc_needs_lo_p): Only return true if HAVE_IN_PLACE_ADDENDS.
	(mips_frob_file): Rework so that only a single pass through the
	relocs is needed.  Allow %lo()s to have higher offsets than their
	corresponding %hi()s or %got()s.

testsuite/
	* gas/mips/elf{,el}-rel.d: Adjust so that the earliest %hi() matches
	the earliest %lo().
	* gas/mips/elf-rel11.d: Don't expect the relocs to be reordered.
	* gas/mips/elf-rel20.[sd]: New test.
	* gas/mips/mips.exp: Run it.
2004-07-03 15:20:53 +00:00
Nick Clifton 310ea3086d (md_apply_fix3:BFD_RELOC_ARM_IMMEDIATE): Do not allow values which have come
from undefined symbols.
Always consider this fixup to have been processed as a reloc cannot be
generated for it.
2004-07-02 11:12:29 +00:00
Alan Modra 09b935accc * frags.h (struct frag): Add has_code and insn_addr fields.
* write.c (cvt_frag_to_fill): Invoke md_frag_check.
	* config/tc-ppc.c (md_assemble): Check and set insn_addr.
	* config/tc-ppc.h (md_frag_check): Define.
2004-07-02 06:40:19 +00:00
Maciej W. Rozycki 4d1cd5c7c2 * doc/Makefile.am (info): Rename goal to...
(info-local): ... this, to preserve implicit dependencies.
* doc/Makefile.in: Regenerate with automake 1.8.5.
2004-06-29 19:41:23 +00:00
Nick Clifton 097f809a19 Add support for M32R GOT relocs 2004-06-25 16:11:09 +00:00
Nick Clifton bb82af9ffe * gas/symbols.c: While discarding ordinary local absolute symbols
when --strip-local-absolute is in effect, retain file symbols.
2004-06-21 10:59:54 +00:00
Andreas Schwab 990ae22a1e * config/tc-m68k.c (mri_chip): Replace current_chip, not augment.
(md_parse_option): Likewise.
2004-06-20 19:33:29 +00:00
Nick Clifton 32137342ec * config/tc-i386.c: Deal with LEX_QM the same way as with LEX_AT.
* config/te-netware.h: New file.
* config/te-ppcnw.h: Delete: Obsolete.
* configure.in: Eliminate ill NetWare targets. Make generic
  NetWare target use proper emulation.
* Makefile.am: Eliminate reference to obsolete te-ppcnw.h, add
  reference to new te-netware.h.
* configure: Regenerate.
* Makefile.in: Regenerate.
2004-06-18 14:09:41 +00:00
Martin Schwidefsky f84d8e26b4 * config/tc-s390.c (s390_insn): Avoid incorrect signed/unsigned
comparison in .insn pseudo operation.
2004-06-15 12:38:08 +00:00
Alan Modra 587aac4eaf * config/obj-coff.c (coff_adjust_section_syms): Use
bfd_get_section_size instead of bfd_get_section_size_before_reloc.
	(coff_frob_section): Likewise.
	* config/tc-mips.c (md_apply_fix3): Likewise.
	* config/obj-elf.c (elf_frob_file): Use bfd_set_section_size.
	(elf_frob_file_after_relocs): Likewise.
2004-06-15 01:16:35 +00:00
Dave Anglin b8fc22bc53 * config/tc-hppa.c (log2): Rename to exact_log2.
(pa_next_subseg): Delete unused function.
	(create_new_space): Mark unused arguments with ATTRIBUTE_UNUSED.
	(create_new_subspace): Likewise.
2004-06-11 17:39:18 +00:00
Dave Anglin 2337eb33bb Bug gas/213
* config/tc-hppa.c (hppa_fix_adjustable): Allow reduction of fake
	labels.  Fix warning.
2004-06-11 17:36:32 +00:00
DJ Delorie 53cb0362bf * config/tc-mn10300.h (tc_fix_adjustable): Define.
* config/tc-mn10300.c (mn10300_fix_adjustable): Don't adjust debug
or non-merged symbols.
2004-05-28 21:33:07 +00:00
H.J. Lu 888a75bebc 2004-05-28 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-ia64.c (remove_marked_resource): Save, clear and
	restore the old slot when inserting srlz.i/srlz.d.
2004-05-28 19:26:31 +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
Nick Clifton 580b9172d2 Convert mode 5 addressing with zero offset into mode 2 addressing to save a
word.
2004-05-28 07:55:21 +00:00
H.J. Lu 652ca075fb gas/
2004-05-27  H.J. Lu  <hongjiu.lu@intel.com>

	* config/tc-ia64.c (ar_is_in_integer_unit): Removed.
	(ar_is_only_in_integer_unit): New.
	(ar_is_only_in_memory_unit): New.
	(generate_unwind_image): Silence gcc on 32bit host.
	(md_assemble): Use ar_is_only_in_integer_unit instead of
	ar_is_in_integer_unit. Check AR access.

gas/testsuite

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

	* gas/ia64/regs.d: Updated.
2004-05-28 05:02:20 +00:00
Nick Clifton 60fed2d357 Sort m68k opcodes into alphabetical order 2004-05-27 07:56:27 +00:00
Nick Clifton be8c092bb0 Reorganise m68k instruction decoding and improve handling of MAC/EMAC 2004-05-24 14:33:22 +00:00
Alan Modra 1181c20ef4 * expr.c (operand, operator): Don't reject '++' and '--'. 2004-05-23 04:35:11 +00:00
Richard Sandiford 20e56c33af * config/tc-mips.c (append_insn): Use ISA-encoded addresses in MIPS16
dwarf tables.
2004-05-20 10:10:43 +00:00
Nick Clifton b2d65c0b3f Add PowerPC LynxOS support 2004-05-17 19:50:16 +00:00
Nick Clifton 0da76f83eb Handle dwarf3 format CIE entries. 2004-05-13 14:41:18 +00:00
Nick Clifton 4b36307329 Change or32-rtems target from COFF to ELF format 2004-05-13 14:12:27 +00:00
Nick Clifton 9598fbe5d4 Updated French translations 2004-05-13 12:54:36 +00:00
Nick Clifton 22fe14ad41 Apply H.J.'s patch to fix label arithmetic when multiple same-name sections are involved 2004-05-11 15:53:47 +00:00
Richard Sandiford 532c738a13 * config/tc-mips.c (append_insn, mips_emit_delays): Extend -mfix-vr4120
to cope with VR4181A errata MD(1) and MD(4).
2004-05-07 16:39:26 +00:00
Brian Ford 0503b35538 * NEWS: Mention .secrel32 for pe[i]-i386. 2004-05-07 14:44:56 +00:00
Alexandre Oliva daeea9904e * config/tc-frv.h (MAX_MEM_FOR_RS_ALIGN_CODE): New.
(HANDLE_ALIGN): New.
2004-05-07 06:28:04 +00:00
Daniel Jacobowitz bfbdcf0474 * Makefile.am (DIST_SUBDIRS): Define.
* aclocal.m4: Regenerate with automake 1.8.4.
	* Makefile.in: Likewise.
	* doc/Makefile.in: Likewise.
2004-05-07 06:23:54 +00:00
Jim Wilson 5e819f9c88 Patch from David Mosberger-Tang.
* config/tc-ia64.c (dot_serialize): Declare.
(dot_serialize): New function.
(md_pseudo_table): Add ".serialize.data" and
".serialize.instruction" directives.
2004-05-06 22:32:44 +00:00
Nick Clifton e59763172f Remove duplicate code and provide a function for generating internally consistent 'value out of range' messages 2004-05-06 11:01:48 +00:00
Alexandre Oliva 996991aa95 * configure.in: Set em=linux for frv-*-*linux*.
* configure: Rebuilt.
* config/tc-frv.h (TARGET_FORMAT): Use elf32-frvfdpic if...
(frv_md_fdpic_enabled): New.
* config/tc-frv.c (frv_md_fdpic_enabled): New.
(DEFAULT_FDPIC): New.
(frv_flags): Use DEFAULT_FDPIC.
(frv_pic_flag): Likewise.
(OPTION_NOPIC): New.
(md_longopts): Add -mnopic.
(md_parse_option): Handle it.
(md_show_usage): Add -mfdpic and -mnopic.
2004-05-06 02:46:45 +00:00
Nick Clifton 6b6e92f432 Add support for 521x,5249,547x,548x. 2004-05-05 14:33:14 +00:00
Jakub Jelinek 6f079ae3d9 * tc-s390.h (md_do_align, HANDLE_ALIGN): Remove.
(NOP_OPCODE): Define.
	(s390_align_code): Remove prototype.
	* tc-s390.c (s390_align_code): Remove.
2004-05-05 13:06:18 +00:00
H.J. Lu 2d6ed997cf 2004-05-04 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-ia64.c (make_unw_section_name): Removed.
	(start_unwind_section): New function.
	(generate_unwind_image): Take const segT instead of const
	char *.
	(dot_handlerdata): Adjusted.
	(dot_endp): Likewise.
2004-05-04 14:58:11 +00:00
H.J. Lu b9f18452d4 2004-05-02 H.J. Lu <hongjiu.lu@intel.com>
* config/obj-elf.c (obj_elf_change_section): Allow the
	".note.GNU-stack" section has SHF_EXECINSTR.
2004-05-03 04:08:32 +00:00
H.J. Lu fafe6678a5 bfd/
2004-05-02  H.J. Lu  <hongjiu.lu@intel.com>

	* section.c (bfd_get_section_by_name_if): New.
	* bfd-in2.h: Regenerated.

gas/

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

	* config/obj-elf.c (get_section): Return bfd_boolean.
	(obj_elf_change_section): Call bfd_get_section_by_name_if
	instead of bfd_map_over_sections.
2004-05-02 14:36:25 +00:00
H.J. Lu 86654c128f gas/
2004-04-30  H.J. Lu  <hongjiu.lu@intel.com>

	* config/obj-elf.c (get_section): New function.
	(obj_elf_change_section): Support multiple sections with same
	name.

gas/testsuite/

2004-04-30  H.J. Lu  <hongjiu.lu@intel.com>

	* gas/elf/elf.exp: Remove group1, add group1a and group1b for
	section group.

	* gas/elf/group1a.d: New file.
	* gas/elf/group1b.d: Likewise.

	* gas/elf/group1.e: Removed.
2004-04-30 16:47:46 +00:00
Nick Clifton 376eb240f8 Fix handling of case sensitive register aliases and add a test for the bug 2004-04-30 10:51:13 +00:00
Nick Clifton 8a7140c38f Add support for generating DWARF2 debug sections in the x86 PE port 2004-04-29 16:40:20 +00:00
Chris Demetriou 3e722fb54b [ bfd/ChangeLog ]
2004-04-28  Chris Demetriou  <cgd@broadcom.com>

	* reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Likewise.

[ gas/ChangeLog ]
2004-04-28  Chris Demetriou  <cgd@broadcom.com>

	* config/tc-mips.c (HAVE_32BIT_ADDRESSES, append_insn, macro_build)
	(load_address, macro, mips_ip, md_parse_option)
	(mips_force_relocation, mips_validate_fix, md_apply_fix3)
	(s_change_sec, pic_need_relax, tc_gen_reloc): Remove all
	embedded-PIC handling, and update comments.
	(SWITCH_TABLE): Remove.
	* config/tc-mips.h (DIFF_EXPR_OK): Delete.
	(enum mips_pic_level): Remove EMBEDDED_PIC.
	(EXTERN_FORCE_RELOC): Remove embedded-PIC handling.
	(TC_FORCE_RELOCATION): Update comment.
	* ecoff.c (ecoff_build_lineno): Add comment about some code that
	might be safe to remove now that MIPS embedded-PIC is gone.
2004-04-29 05:14:22 +00:00
Dave Anglin 351e2b5aa7 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
dup_common fields.
	(setup_sections): Use som_subspace_dictionary_record struct instead
	subspace_dictionary_record.  Set SEC_LINK_ONCE if subspace is
	is_comdat, is_common or dup_common.
	(som_prep_headers): Use som_subspace_dictionary_record struct.  Set
	is_comdat, is_common and dup_common in section subspace_dict from
	copy_data.
	(som_begin_writing): Use som_subspace_dictionary_record struct.
	(som_finish_writing): Likewise.
	(som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
	is_common and dup_common flags in info for symbol.  Add comment
	regarding linker support for these fields.  Slightly reorganize
	function.
	(som_build_and_write_symbol_table): Set is_comdat, is_common and
	dup_common fields in symbol table from symbol info.
	(bfd_som_set_subsection_attributes): Add comdat, common and dup_common
	arguments.  Set corresponding fields in copy_data.  Change all callers.
	(som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
	symbol table.
	(som_vec): Add SEC_LINK_ONCE to applicable section flags.
	* som.h (som_subspace_dictionary_record): Define.
	(som_copyable_section_data_struct): Add is_comdat, is_common and
	dup_common fields.
	(som_section_data_struct): Use som_subspace_dictionary_record struct
	instead of subspace_dictionary_record.
	(bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
	* config/obj-som.c (obj_som_init_stab_section): Add new arguments in
	call to obj_set_subsection_attributes.
	(obj_som_init_stab_section): Likewise.
	* config/tc-hppa.c (default_subspace_dict): Add comdat field.
	(pa_def_subspaces): Provide comdat default.
	(pa_subspace): Handle new "comdat" parameter.  Set SEC_LINK_ONCE and
	not SEC_IS_COMMON if section is comdat, common or dup_common.  Update
	calls to create_new_subspace and update_subspace to pass comdat flag.
	(create_new_subspace, update_subspace): Add new comdat argument.  Use
	it in calls to obj_set_subsection_attributes.
	* doc/c-hppa.texi (.subspa, .nsubspa): Document new comdat parameter
	and use of comdat, common and dup_comm parameters.
2004-04-28 18:02:49 +00:00
H.J. Lu f5842774f4 binutils/
2004-04-26  H.J. Lu  <hongjiu.lu@intel.com>

	* readelf.c (do_section_groups): New.
	(options): Add --section-groups/-g.
	(usage): Mention --section-groups/-g.
	(parse_args): Support --section-groups/-g.
	(get_group_flags): New.
	(process_section_groups): New.
	(process_object): Call process_section_groups.

gas/

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

	* config/obj-elf.c (obj_elf_change_section): Check if the old
	group name is NULL before comparison.

gas/testsuite/

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

	* gas/elf/elf.exp: Add group0a, group0b and group1 for section
	group.

	* gas/elf/group0.s: New file.
	* gas/elf/group0a.d: Likewise.
	* gas/elf/group0b.d: Likewise.
	* gas/elf/group1.e: Likewise.
	* gas/elf/group1.s: Likewise.
2004-04-27 03:59:09 +00:00
Chris Demetriou 558fe4a71c 2004-04-23 Chris Demetriou <cgd@broadcom.com>
* config/tc-mips.h (mips_dwarf2_addr_size): Prototype.
2004-04-24 06:57:28 +00:00