Commit Graph

49 Commits

Author SHA1 Message Date
Eric Christopher 82f0cfbdcc 2005-03-24 Eric Christopher <echristo@redhat.com>
* elfxx-mips.c: Revert previous patch.

2005-03-24  Eric Christopher  <echristo@redhat.com>

	* ld-mips-elf/rel32-n32.d: Revert changes.
	* ld-mips-elf/rel32-o32.d: Ditto.
	* ld-mips-elf/rel64.d: Ditto.
2005-03-24 22:47:52 +00:00
Eric Christopher cc27e1dc44 bfd/ChangeLog:
2005-03-23  Eric Christopher  <echristo@redhat.com>

	* elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
	(mips_elf_calculate_relocation): Use. Define DF_TEXTREL
	after emitting relocation.
	(_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
	(_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
	and readonly_reloc.

ld/testsuite/ChangeLog:

2005-03-23  Eric Christopher  <echristo@redhat.com>

	* ld-mips-elf/textrel-1.s, ld-mips-elf/textrel-1.d: New
	test.
	* ld-mips-elf/mips-elf.exp: Call it.
	* ld-mips-elf/rel32-n32.d: Update for DF_TEXTREL removal.
	* ld-mips-elf/rel32-o32.d: Ditto.
	* ld-mips-elf/rel64.d: Ditto.
2005-03-24 01:30:47 +00:00
Thiemo Seufer bbe506e8ba bfd/ChangeLog
* elfxx-mips.c (mips_elf_calculate_relocation): Handle special
	'__gnu_local_gp' symbol used by gas -mno-shared.

	gas/ChangeLog
	* config/tc-mips.c (macro_build_lui): Use '__gnu_local_gp'
	instead of '_gp' for -mno-shared optimization.
	(s_cpload): Ditto.
	(s_abicalls): Document it in the comment.
	(md_show_usage): Document the -mno-shared option.

	gas/testsuite/ChangeLog
	* gas/mips/elf-rel23b.d: Use '__gnu_local_gp' instead of '_gp'
	for -mno-shared optimization.
	* gas/mips/elf-rel25a.d: Ditto.

	ld/testsuite/ChangeLog
	* ld-mips-elf/multi-got-no-shared-1.s,
	ld-mips-elf/multi-got-no-shared-2.s,
	ld-mips-elf/multi-got-no-shared.d: New tests.
	* ld-mips-elf/mips-elf.exp: Run them.
2005-03-05 00:01:44 +00:00
Daniel Jacobowitz f4e584bd00 * ld-mips-elf/tlsbin-o32.s, ld-mips-elf/mips-dyn.ld,
ld-mips-elf/tlslib-o32.got, ld-mips-elf/tlslib-o32.d,
	ld-mips-elf/tlslib-o32.s, ld-mips-elf/mips-lib.ld,
	ld-mips-elf/tlsbin-o32.got, ld-mips-elf/tlsdyn-o32.d,
	ld-mips-elf/tlsdyn-o32.got, ld-mips-elf/tlsbin-o32.d,
	ld-mips-elf/tlsdyn-o32.s, ld-mips-elf/tls-multi-got-1.got,
	ld-mips-elf/tls-multi-got-1-1.s, ld-mips-elf/tls-multi-got-1.d,
	ld-mips-elf/tls-multi-got-1.r, ld-mips-elf/tls-multi-got-1-2.s,
	ld-mips-elf/tlslib-o32-ver.got, ld-mips-elf/tlslib.ver,
	ld-mips-elf/tlslib-o32-hidden.got, ld-mips-elf/tlslib-hidden.ver,
	ld-mips-elf/tlsdyn-o32-1.d, ld-mips-elf/tlsdyn-o32-3.got,
	ld-mips-elf/tlsdyn-o32-2.d, ld-mips-elf/tlsdyn-o32-2.s,
	ld-mips-elf/tlsdyn-o32-3.d, ld-mips-elf/tlsdyn-o32-1.got,
	ld-mips-elf/tlsdyn-o32-2.got: New files.
	* ld-mips-elf/mips-elf.exp: Run the new tests.
2005-03-02 21:22:57 +00:00
Eric Christopher 9b2f1d3522 2005-02-22 Eric Christopher <echristo@redhat.com>
* ld-mips-elf/reloc-merge-lo16.d: Correct symbol
	table size for __start.

2005-02-22  Eric Christopher  <echristo@redhat.com>

	* config/tc-mips.c (struct proc): Change isym to
	func_sym. New member func_end_sym.
	(s_mips_ent): Update.
	(s_mips_end): Ditto. Add code to compute function size.
2005-02-22 23:54:41 +00:00
Maciej W. Rozycki d6f1659387 bfd/:
2005-02-15  Nigel Stephens  <nigel@mips.com>
            Maciej W. Rozycki  <macro@mips.com>

	* elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
	reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
	R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
	(elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
	(elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
	dst_mask.
	(mips16_gprel_reloc): Remove bit shuffling; call
	_bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
	and _bfd_mips16_elf_reloc_shuffle() instead.
	(mips16_reloc_map): New reloc map for MIPS16 relocs.
	(bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
	relocs.
	(mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
	elf_mips16_howto_table_rel.
	* elf64-mips.c (mips16_elf64_howto_table_rel): New array for
	MIPS16 REL reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16
	relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
	(elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
	(elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
	dst_mask.
	(mips16_elf64_howto_table_rela): New array for MIPS16 RELA
	reloc howtos.  Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
	R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
	placeholders.
	(mips16_gprel_reloc): Remove bit shuffling; call
	_bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
	and _bfd_mips16_elf_reloc_shuffle() instead.
	(mips16_reloc_map): New reloc map for MIPS16 relocs.
	(bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
	relocs.
	(mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
	mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
	* elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
	REL reloc howtos.  Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
	R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
	(elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
	(elf_mips16_gprel_howto): Likewise.  Redefine src_mask and
	dst_mask.
	(mips16_gprel_reloc): Remove bit shuffling; call
	_bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
	and _bfd_mips16_elf_reloc_shuffle() instead.
	(mips16_reloc_map): New reloc map for MIPS16 relocs.
	(bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
	relocs.
	(mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
	elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
	* elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
	handle bit shuffling for MIPS16 relocs.
	(_bfd_mips16_elf_reloc_shuffle): Likewise.
	(_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
	and _bfd_mips16_elf_reloc_shuffle().
	(_bfd_mips_elf_generic_reloc): Likewise.
	(mips_elf_calculate_relocation): Likewise.  Handle R_MIPS16_HI16
	and R_MIPS16_LO16.
	(mips_elf_obtain_contents): Remove bit shuffling.
	(mips_elf_perform_relocation): Likewise; call
	_bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
	instead.
	(_bfd_mips_elf_relocate_section): Likewise.  Handle R_MIPS16_HI16
	and R_MIPS16_LO16.
	* elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
	(_bfd_mips16_elf_reloc_shuffle): Likewise.
	* reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
	(BFD_RELOC_MIPS16_HI16_S): Likewise.
	(BFD_RELOC_MIPS16_LO16): Likewise.
	* bfd-in2.h: Regenerate.
	* libbfd.h: Regenerate.

gas/:
2005-02-15  Nigel Stephens  <nigel@mips.com>
            Maciej W. Rozycki  <macro@mips.com>

	* config/tc-mips.c (reloc_needs_lo_p): Handle
	BFD_RELOC_MIPS16_HI16_S.
	(fixup_has_matching_lo_p): Handle BFD_RELOC_MIPS16_LO16.
	(append_insn): Add BFD_RELOC_MIPS16_GPREL, BFD_RELOC_MIPS16_HI16_S
	and BFD_RELOC_MIPS16_LO16 to relocs to suppress overflow
	complaints on.
	(mips16_ip): Resolve BFD_RELOC_MIPS16_HI16_S,
	BFD_RELOC_MIPS16_HI16 and BFD_RELOC_MIPS16_LO16 for constants.
	Call my_getSmallExpression() to parse percent operators.
	(percent_op_match, mips_percent_op): Separate definitions.
	(mips16_percent_op): Define percent operators for the MIPS16 mode.
	(parse_relocation): Handle the MIPS16 mode using
	mips16_percent_op.
	(md_apply_fix3): Handle BFD_RELOC_MIPS16_HI16,
	BFD_RELOC_MIPS16_HI16_S and BFD_RELOC_MIPS16_LO16.

gas/testsuite/:
2005-02-15  Nigel Stephens  <nigel@mips.com>
            Maciej W. Rozycki  <macro@mips.com>

	* gas/mips/mips16-hilo.d: New test for the R_MIPS16_HI16 and
	R_MIPS16_LO16 relocs.
	* gas/mips/mips16-hilo-n32.d: Likewise, for the n32 ABI.
	* gas/mips/mips16-hilo.s: Source for the new tests.
	* gas/mips/mips.exp: Run the new tests.

include/:
2005-02-15  Nigel Stephens  <nigel@mips.com>
            Maciej W. Rozycki  <macro@mips.com>

	* elf/mips.h (R_MIPS16_GOT16): New reloc code.
	(R_MIPS16_CALL16): Likewise.
	(R_MIPS16_HI16): Likewise.
	(R_MIPS16_LO16): Likewise.
	(R_MIPS16_min): New fake reloc code.
	(R_MIPS16_max): Likewise.

ld/testsuite/:
2005-02-15  Nigel Stephens  <nigel@mips.com>
            Maciej W. Rozycki  <macro@mips.com>

	* ld-mips-elf/mips16-hilo.d: New test for the R_MIPS16_HI16 and
	R_MIPS16_LO16 relocs.
	* ld-mips-elf/mips16-hilo-n32.d: Likewise, for the n32 ABI.
	* ld-mips-elf/mips16-hilo.s: Auxiliary source for the new tests.
	* ld-mips-elf/mips-elf.exp: Run the new tests.
2005-02-15 19:57:54 +00:00
Daniel Jacobowitz 732be17378 * ld-mips-elf/eh-frame3.d, ld-mips-elf/eh-frame4.d: Move comments
after test commands.
	* ld-mips-elf/mips-elf.exp: Skip multi-got-1 on non-GNU/Linux
	systems.
2005-02-02 20:19:35 +00:00
Daniel Jacobowitz 4d4ee08e8c * ld-mips-elf/elf-rel-got-n32.d, ld-mips-elf/elf-rel-got-n64-linux.d,
ld-mips-elf/elf-rel-got-n64.d, ld-mips-elf/elf-rel-xgot-n32.d,
	ld-mips-elf/elf-rel-xgot-n64-linux.d, ld-mips-elf/elf-rel-xgot-n64.d,
	ld-mips-elf/jalbal.d: Force big-endian.
	* ld-mips-elf/multi-got-1.d: Make more flexible.
	* ld-mips-elf/rel32-n32.d, ld-mips-elf/rel32-o32.d,
	ld-mips-elf/rel64.d: Update offsets.
2005-01-31 22:01:02 +00:00
Richard Sandiford 8c946ed5d5 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
(_bfd_elf_eh_frame_address_size): Declare.
	* elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
	(elfNN_bed): Initialize elf_backend_eh_frame_address_size.
	* elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
	(elf_backend_eh_frame_address_size): Define.
	* elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
	* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
	size from the new backend hook.
	(_bfd_elf_write_section_eh_frame): Likewise.
	(_bfd_elf_eh_frame_address_size): New function.
2005-01-31 20:39:11 +00:00
Richard Sandiford dcf507a6ee * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
(_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
	instructions.  If the amount of padding is known, reduce the size
	of the CIE or FDE by that amount.
2005-01-17 17:44:41 +00:00
Richard Sandiford c314987d19 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
overflow for calls to undefined weak symbols.
2004-12-14 09:48:20 +00:00
Richard Sandiford 1f0f3e9b89 * ld-mips-elf/mips-elf.exp: Only run jalbal if n32 is supported. 2004-12-13 13:09:55 +00:00
Ian Lance Taylor 3a6eb9c0d7 * ld-mips-elf/jalbal.d: New test.
* ld-mips-elf/jalbal.s: New test.
	* ld-mips-elf/mips-elf.exp: Run it.
2004-12-09 07:14:53 +00:00
Ian Lance Taylor 0efd416086 * ld-mips-elf/jaloverflow.d: New test.
* ld-mips-elf/jaloverflow.s: New test.
	* ld-mips-elf/mips-elf.exp: Run it.
2004-12-08 20:28:08 +00:00
Richard Sandiford 353057a53c * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
add_fde_encoding.  Remove need_relative.
	* elf-eh-frame.c (extra_augmentation_string_bytes)
	(extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
	(_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
	in cases where the CIE has no existing 'R' augmentation.  Use
	size_of_output_cie_fde when assigning offsets.  Use the final offset
	as the new section size.
	(_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
	Account for any extra augmentation bytes in the returned offset.
	(_bfd_elf_write_section_eh_frame): Rework so that the entries are
	moved before being modified.  Pad growing entries with DW_CFA_nops.
	Add 'z' and 'R' augmentations as directed by add_augmentation_size
	and add_fde_encoding.
2004-11-16 10:16:30 +00:00
Richard Sandiford 17a6716ad0 * ld-mips-elf/reloc-merge-lo16.{s,d,ld}: New test.
* ld-mips-elf/mips-elf.exp: Run it.
2004-07-08 15:43:00 +00:00
Chris Demetriou 76fe5927f9 2004-04-23 Chris Demetriou <cgd@broadcom.com>
* ld-mips-elf/reloc-3-r.d: Remove, as part of MIPS -membedded-pic
        removal.
        * ld-mips-elf/reloc-3-srec.d: Likewise.
        * ld-mips-elf/reloc-3.ld: Likewise.
        * ld-mips-elf/reloc-3a.s: Likewise.
        * ld-mips-elf/reloc-3b.s: Likewise.
        * ld-mips-elf/mips-elf.exp: Don't run now-removed tests.
2004-04-24 00:20:13 +00:00
Chris Demetriou 23867d6732 [ bfd/ChangeLog ]
2004-04-21  Chris Demetriou  <cgd@broadcom.com>

	* coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
	* elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
	* bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
	(bfd_mips_elf32_create_embedded_relocs): Remove prototypes
	* bfd-in2.h: Regenerate.

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

	* ld.texinfo: Remove MIPS --embedded-relocs documentation.
	* emulparams/elf32bmip.sh (EXTRA_EM_FILE): Remove definition.
	* emulparams/mipsidt.sh (TEMPLATE_NAME): Use generic.em.
	(EXTRA_EM_FILE): Use mipsecoff.em
	* emulparams/mipsidtl.sh (TEMPLATE_NAME): Use generic.em.
	(EXTRA_EM_FILE): Use mipsecoff.em
	* emultempl/mipsecoff.em: Restructure to be included as an
	extra emulation file.
	(check_sections, gld${EMULATION_NAME}_after_open)
	(gld${EMULATION_NAME}_after_allocation)
	(gld${EMULATION_NAME}_get_script)
	(ld_${EMULATION_NAME}_emulation): Remove
	(gld${EMULATION_NAME}_before_parse): Rename to...
	(mipsecoff_before_parse): This.
	(LDEMUL_BEFORE_PARSE): Define.
	* emultempl/mipself.em: Remove file.
	* scripttempl/mips.sc (.rel.sdata): Do not include in output.
	(__runtime_reloc_start, __runtime_reloc_stop): Stop providing
	these symbols.
	* Makefile.am: Remove dependencies on emultempl/mipself.em.
	* Makefile.in: Regenerate.

[ ld/testsuite/ChangeLog ]
2004-04-21  Chris Demetriou  <cgd@broadcom.com>

	* ld-empic/run.c: Removed as part of MIPS --embedded-relocs removal.
	* ld-empic/empic.exp: Likewise.
	* ld-empic/relax.t: Likewise.
	* ld-empic/relax1.c: Likewise.
	* ld-empic/relax2.c: Likewise.
	* ld-empic/relax3.c: Likewise.
	* ld-empic/relax4.c: Likewise.
	* ld-empic/runtest1.c: Likewise.
	* ld-empic/runtest2.c: Likewise.
	* ld-empic/runtesti.s: Likewise.
	* ld-mips-elf/empic1-ln.d: Likewise.
	* ld-mips-elf/empic1-lp.d: Likewise.
	* ld-mips-elf/empic1-mn.d: Likewise.
	* ld-mips-elf/empic1-mp.d: Likewise.
	* ld-mips-elf/empic1-ref.s: Likewise.
	* ld-mips-elf/empic1-sn.d: Likewise.
	* ld-mips-elf/empic1-sp.d: Likewise.
	* ld-mips-elf/empic1-space.s: Likewise.
	* ld-mips-elf/empic1-tgt.s: Likewise.
	* ld-mips-elf/empic2-fwd-0.d: Likewise.
	* ld-mips-elf/empic2-fwd-1.d: Likewise.
	* ld-mips-elf/empic2-fwd-tgt.s: Likewise.
	* ld-mips-elf/empic2-ref.s: Likewise.
	* ld-mips-elf/empic2-rev-0.d: Likewise.
	* ld-mips-elf/empic2-rev-1.d: Likewise.
	* ld-mips-elf/empic2-rev-tgt.s: Likewise.
	* ld-mips-elf/empic2-space.s: Likewise.
	* ld-mips-elf/emrelocs-eb.d: Likewise.
	* ld-mips-elf/emrelocs-el.d: Likewise.
	* ld-mips-elf/emrelocs.ld: Likewise.
	* ld-mips-elf/emrelocs1.s: Likewise.
	* ld-mips-elf/emrelocs2.s: Likewise.
	* ld-mips-elf/mips-elf.exp: Don't run now-removed tests.
2004-04-21 20:52:31 +00:00
Richard Sandiford d25aed713b bfd/
* elfxx-mips.c (mips_elf_calculate_relocation): Use
	_bfd_elf_symbol_refs_local_p to decide whether to decay
	a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
	(_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
	relocs if the symbol wasn't defined by a regular object file.
	Don't check the symbol's dynindx.

ld/testsuite/
	* ld-mips/elf/elf-rel-xgot-{n32,n64-linux}.d: Update after 2004-02-02
	changes to the way large constants are added.
	* ld-mips/elf/elf-rel-got-{n32,n64-linux}.d: Likewise.  Adjust order
	of GOT entries after today's change to the handling of GOT_PAGE
	relocations.
2004-02-17 10:19:24 +00:00
Richard Sandiford 18ab192184 * ld-mips-elf/reloc-1[ab].s: New source files.
* ld-mips-elf/reloc-1-{n32,n64,rel}.d: New tests.
	* ld-mips-elf/reloc-2[ab].s: New source files.
	* ld-mips-elf/reloc-2.{d,ld}: New test.
	* ld-mips-elf/reloc-3[ab].s: New source files.
	* ld-mips-elf/reloc-3-{r,srec}.d: New tests.
	* ld-mips-elf/mips-elf.exp: Run them.
2003-12-18 10:25:12 +00:00
Richard Sandiford 258e658f8b * ld-mips-elf/elf-rel-xgot-n32.d: Fix offset for "lw $5,dl1+34($5)".
* ld-mips-elf/elf-rel-xgot-n64-linux.d: Likewise.
2003-12-07 21:49:09 +00:00
Richard Sandiford 98a8deaf8a * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
	(_bfd_mips_elf_finish_dynamic_symbol): Don't handle them.  Don't
	handle DT_MIPS_MSYM.  Set DT_RELSZ based on the number of relocations
	that were needed.
	(_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
	(_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
2003-10-13 19:51:10 +00:00
Chris Demetriou 5f74bc130d [ bfd/ChangeLog ]
2003-09-30  Chris Demetriou  <cgd@broadcom.com>

	* archures.c (bfd_mach_mipsisa64r2): New define.
	* bfd-in2.h: Regenerate.
	* aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
	* cpu-mips.c (I_mipsisa64r2): New enum value.
	(arch_info_struct): Add entry for I_mipsisa64r2.
	* elfxx-mips.c (_bfd_elf_mips_mach)
	(_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
	(mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
	(mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.

[ binutils/ChangeLog ]
2003-09-30  Chris Demetriou  <cgd@broadcom.com>

	* readelf.c (get_machine_flags): Handle E_MIPS_ARCH_64R2.

[ gas/Changelog ]
2003-09-30  Chris Demetriou  <cgd@broadcom.com>

	* configure.in (mipsisa64r2, mipsisa64r2el, mipsisa64r2*): New CPUs.
	* configure: Regenerate.
	* config/tc-mips.c (imm2_expr): New variable.
	(md_assemble, mips16_ip): Initialize imm2_expr.
	(ISA_HAS_64BIT_REGS, ISA_HAS_DROR, ISA_HAS_ROR): Add ISA_MIPS64R2.
	(macro_build): Handle +A, +B, +C, +E, +F, +G, and +H format operands.
	(macro): Handle M_DEXT and M_DINS.
	(validate_mips_insn): Handle +E, +F, +G, +H, and +I format operands.
	(mips_ip): Likewise.
	(OPTION_MIPS64R2): New define.
	(md_longopts): New entry for -mips64r2 (OPTION_MIPS64R2).
	OPTION_ASE_BASE): Increase to compensate for OPTION_MIPS64R2.
	(md_parse_option): Handle OPTION_MIPS64R2.
	(s_mipsset): Handle setting "mips64r2" ISA.
	(mips_cpu_info_table): Add mips64r2.
	(md_show_usage): Document -mips64r2 option.
	* doc/as.texinfo: Docuemnt -mips64r2 option.
	* doc/c-mips.texi: Likewise.

[ gas/testsuite/ChangeLog ]
2003-09-30  Chris Demetriou  <cgd@broadcom.com>

	* gas/mips/cp0-names-mips64r2.d: New file.
	* gas/mips/cp0sel-names-mips64r2.d: New file.
	* gas/mips/elf_arch_mips64r2.d: New file.
	* gas/mips/hwr-names-mips64r2.d: New file.
	* gas/mips/mips32r2-ill-fp64.l: New file.
	* gas/mips/mips32r2-ill-fp64.s: New file.
	* gas/mips/mips64r2-ill.l: New file.
	* gas/mips/mips64r2-ill.s: New file.
	* gas/mips/mips64r2.d: New file.
	* gas/mips/mips64r2.s: New file.
	* gas/mips/mips.exp: Define "mips64r2" arch, and run new tests.

[ include/elf/ChangeLog ]
2003-09-30  Chris Demetriou  <cgd@broadcom.com>

	* mips.h (E_MIPS_ARCH_64R2): New define.

[ include/opcode/ChangeLog ]
2003-09-30  Chris Demetriou  <cgd@broadcom.com>

	* mips.h: Document +E, +F, +G, +H, and +I operand types.
	Update documentation of I, +B and +C operand types.
	(INSN_ISA64R2, ISA_MIPS64R2, CPU_MIPS64R2): New defines.
	(M_DEXT, M_DINS): New enum values.

[ ld/ChangeLog ]
2003-09-30  Chris Demetriou  <cgd@broadcom.com>

	* ldmain.c (get_emulation): Ignore "-mips64r2".

[ ld/testsuite/ChangeLog ]
2003-09-30  Chris Demetriou  <cgd@broadcom.com>

	* ld-mips-elf/mips-elf-flags.exp: Add tests for combinations
	with MIPS64r2.

[ opcodes/ChangeLog ]
2003-09-30  Chris Demetriou  <cgd@broadcom.com>

	* mips-dis.c (mips_arch_choices): Add entry for "mips64r2"
	(print_insn_args): Add handing for +E, +F, +G, and +H.
	* mips-opc.c (I65): New define for MIPS64r2.
	(mips_builtin_opcodes): Add "dext", "dextm", "dextu", "dins",
	"dinsm", "dinsu", "drotl", "drotr", "drotr32", "drotrv", "dsbh",
	and "dshd" for MIPS64r2.  Adjust "dror", "dror32", and "drorv" to
	be supported on MIPS64r2.
2003-09-30 16:17:15 +00:00
Thiemo Seufer 4ca2ec8897 * ld-mips-elf/relax-jalr-n32.d: Fix little endian test failure.
* ld-mips-elf/relax-jalr-n32-shared.d: Likewise.
	* ld-mips-elf/relax-jalr-n64.d: Likewise.
	* ld-mips-elf/relax-jalr-n64-shared.d: Likewise.
2003-09-21 16:40:29 +00:00
Thiemo Seufer fbf18a5ce9 * ld-mips-elf/mips-elf.exp: Use is_elf_format. 2003-06-28 22:14:59 +00:00
Thiemo Seufer 0c29b4ccce * ld-mips-elf/mips-elf-flags.exp: Use -melf32bsmip for IRIX6. 2003-06-28 22:12:26 +00:00
Thiemo Seufer b7c7d6c193 * config/tc-mips.c (ADDRESS_ADD_INSN,ADDRESS_ADDI_INSN): Remove
special handling for n32 ABI.
	(macro): Likewise.
	* gas/mips/elf-rel-got-n32.d: Remove special handling for n32 ABI.
	* gas/mips/elf-rel-xgot-n32.d: Likewise.
	* gas/mips/jal-newabi.d: Likewise.
	* ld-mips-elf/elf-rel-got-n32.d: Remove special handling for n32 ABI.
	* ld-mips-elf/elf-rel-xgot-n32.d: Likewise.
2003-06-21 21:38:04 +00:00
Thiemo Seufer 31a1f3a136 * ld-mips-elf/elf-rel-got-n64-linux.d: New file.
* ld-mips-elf/elf-rel-xgot-n64-linux.d: New file.
	* ld-mips-elf/mips-elf.exp: Use the new files for Linux.
2003-06-12 17:07:14 +00:00
Thiemo Seufer 2d8f7dc8d5 * ld-mips-elf/relax-jalr.s: Fix testsuite breakage.
* ld-mips-elf/relax-jalr-n32.d: Likewise.
	* ld-mips-elf/relax-jalr-n32-shared.d: Likewise.
	* ld-mips-elf/relax-jalr-n64.d: Likewise.
	* ld-mips-elf/relax-jalr-n64-shared.d: Likewise.
2003-06-11 22:51:59 +00:00
Thiemo Seufer d80dcc6af4 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
for n32, too.
	(MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
	(mips_elf_rel_dyn_section): Use appropriate section alignment.
	(mips_elf_create_got_section): Likewise.
	(_bfd_mips_elf_create_dynamic_sections): Likewise.
	* ld-mips-elf/multi-got-1.d: Adjust addresses.
	* ld-mips-elf/rel32-n32.d: Likewise.
2003-06-11 21:01:50 +00:00
Thiemo Seufer 5ef0935e19 * gas/mips/mips.exp: Fix typo.
* gas/mips/elempic.d: Force o64 ABI.
	* gas/mips/telempic.d: Likewise.
	* ld-mips-elf/rel32-n32.d: Force big endian assembly.
	* ld-mips-elf/rel32-o32.d: Likewise.
	* ld-mips-elf/rel64.d: Likewise.
2003-06-10 19:45:24 +00:00
Jason Thorpe 493e6a13fd * ld-mips-elf/mips-elf.exp: Make all NetBSD targets match as elf. 2003-05-25 14:36:19 +00:00
Alexandre Oliva 697380b39c * config/default.exp (gcc_gas_flags): Force ABI to n32 on
mips64-linux.
* ld-elf/merge.d: Xfail on mips64*-linux-gnu*.
* ld-mips-elf/mips-elf-flags.exp (ldemul): Set to o32-compatible
on mips-sgi-irix6*, mips64-linux-gnu and mips64el-linux-gnu.
(good_combination, bad_combination): Use it.
Add -32 or -mabi=o64 wherever the ABI was formerly implied.
2003-05-07 05:08:02 +00:00
Alexandre Oliva 508073f77f * ld-mips-elf/multi-got-1.d: Force into big-endian mode.
Turn relocation offsets into regexps.
2003-05-04 21:06:35 +00:00
Alexandre Oliva 7d6c757702 * ld-mips-elf/elf-rel-got-n32.d,
ld-mips-elf/elf-rel-got-n64.d, ld-mips-elf/elf-rel-xgot-n32.d,
ld-mips-elf/elf-rel-xgot-n64.d: New.
* ld-mips-elf/mips-elf.exp (hasn32): Define as condition for
new tests to run.
2003-04-11 01:56:51 +00:00
Alexandre Oliva 05e6bb2fc9 * ld-mips-elf/mips-elf.exp: Added...
* ld-mips-elf/relax-jalr.s, ld-mips-elf/relax-jalr-n32.d,
ld-mips-elf/relax-jalr-n32-shared.d, ld-mips-elf/relax-jalr-n64.d,
ld-mips-elf/relax-jalr-n64-shared.d: New tests.
2003-03-26 01:05:44 +00:00
Alexandre Oliva 48fe7bdacc * ld-mips-elf/mips-elf.exp (linux_gnu): New variable. Add:
* ld-mips-elf/rel32-o32.d, ld-mips-elf/rel32-n32.d,
ld-mips-elf/rel64.d, ld-mips-elf/rel32.s, ld-mips-elf/rel64.s: New
tests.
2003-03-11 19:20:16 +00:00
Alexandre Oliva 8914585cde * ld-mips-elf/multi-got-1.d: New.
* ld-mips-elf/multi-got-1-1.s: New.
* ld-mips-elf/multi-got-1-2.s: New.
* ld-mips-elf/mips-elf.exp (elf): mips*-*-irix* is elf.
Run multi-got-1.
2003-01-28 00:01:53 +00:00
Richard Sandiford 1efcd1fdb6 * ld-mips-elf/mips-elf-flags.exp: Add -mips4 to a -mgp64 test. 2003-01-03 11:04:26 +00:00
Richard Sandiford 64543e1acf bfd/
* elfxx-mips.c: Include libiberty.h.
	(elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
	(mips_set_isa_flags): New function, split out from...
	(_bfd_mips_elf_final_write_processing): ...here.  Only call
	mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
	(mips_mach_extensions): New array.
	(mips_32bit_flags_p): New function.
	(_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
	Use mips_32bit_flags_p to check if one binary is 32-bit and the
	other is 64-bit.  When adopting IBFD's architecture, adopt the
	bfd_mach as well as the flags.

ld/testsuite/
	* ld-mips-elf/jr.s: New file.
	* ld-mips-elf/mips-elf-flags.exp: New test.
2003-01-02 21:31:32 +00:00
Alexandre Oliva c9c1e416d7 * ld-mips-elf/mips-elf.exp: Remove branch-misc-2 test.
* ld-mips-elf/branch-misc-2.d: Removed.
2002-12-12 04:39:44 +00:00
Chris Demetriou 30a2f863bc 2002-10-03 Chris Demetriou <cgd@broadcom.com>
* ld-mips-elf/branch-misc-1.d: Link at 0x500000 and use -N, to be
        more compatible with non-embedded targets.
        * ld-mips-elf/branch-misc-2.d: Likewise.

        * ld-mips-elf/mips-elf.exp: Clean up some comments about embedded
        PIC tests.
        (elf): New variable, to control whether generic ELF tests are run.
        (embedded_elf): New variable, to control whether ELF tests
        requiring embedded PIC or embedded relocs are run.
2002-10-03 23:56:24 +00:00
Chris Demetriou 2dc83527fb [ gas/testsuite/ChangeLog ]
2002-09-18  Chris Demetriou  <cgd@broadcom.com>

        * gas/mips/branch-misc-1.d: New file.
        * gas/mips/branch-misc-1.s: New file.
        * gas/mips/branch-misc-2.s: New file.
        * gas/mips/branch-misc-2.d: New file.
        * gas/mips/mips.exp: Run new tests.

[ ld/testsuite/ChangeLog ]
2002-09-18  Chris Demetriou  <cgd@broadcom.com>

        * ld-mips-elf/branch-misc-1.d: New file.
        * ld-mips-elf/branch-misc-2.d: New file.
        * ld-mips-elf/mips-elf.exp: Run new tests.
2002-09-18 20:50:47 +00:00
Chris Demetriou 70a3140046 [ gas/testsuite/ChangeLog ]
2002-07-26  Chris Demetriou  <cgd@broadcom.com>

        * gas/mips/elf_ase_mips16.d: New file to test ELF MIPS16 ASE marking.
        * gas/mips/elf_ase_mips16.s: Likewise.
        * gas/mips/mips.exp: Run the new test.

[ ld/testsuite/ChangeLog ]
2002-07-26  Chris Demetriou  <cgd@broadcom.com>

        * ld-mips-elf/mips16-1.d: Check that ASE flag is actually set.
2002-07-29 21:07:12 +00:00
Richard Sandiford fb39dac1ef [bfd/]
* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
	flags into resulting BFD.

[ld/testsuite/]
	* ld-mips-elf/mips16-1.d,
	* ld-mips-elf/mips16-1[ab].s: New test.
	* ld-mips-elf/mips-elf.exp: Run it.
2002-07-26 18:56:25 +00:00
Chris Demetriou e0350bfbf7 2002-06-18 Chris Demetriou <cgd@broadcom.com>
* ld-mips-elf/empic2-ref.s: Add a missing .end, apparently
	turned up by recent assembler changes.
2002-06-19 01:48:10 +00:00
Richard Sandiford e560f274e3 * ld-mips-elf/region1a.s,
* ld-mips-elf/region1b.s,
	* ld-mips-elf/region1.t,
	* ld-mips-elf/region1.d: New test.
	* ld-mips-elf/mips-elf.exp: Run it.
2002-06-10 16:14:08 +00:00
Chris Demetriou 38b566ae19 2002-01-29 Chris Demetriou <cgd@broadcom.com>
* ld-mips-elf/emrelocs-eb.d: New file to test --embedded-relocs.
        * ld-mips-elf/emrelocs-el.d: Likewise.
        * ld-mips-elf/emrelocs1.s: Likewise.
        * ld-mips-elf/emrelocs2.s: Likewise.
        * ld-mips-elf/emrelocs.ld: Likewise.
        * ld-mips-elf/mips-elf.exp: Add the above to the list of tests.
2002-01-30 02:20:13 +00:00
Chris Demetriou a657e7c198 2002-01-02 Chris Demetriou <cgd@broadcom.com>
* ld-mips-elf/empic1-ln.d: New file to test basic linking of
        R_MIPS_GNU_REL_HI16 and R_MIPS_GNU_REL_LO16 relocations.
        * ld-mips-elf/empic1-lp.d: Likewise.
        * ld-mips-elf/empic1-mn.d: Likewise.
        * ld-mips-elf/empic1-mp.d: Likewise.
        * ld-mips-elf/empic1-sn.d: Likewise.
        * ld-mips-elf/empic1-sp.d: Likewise.
        * ld-mips-elf/empic1-ref.s: Likewise.
        * ld-mips-elf/empic1-space.s: Likewise.
        * ld-mips-elf/empic1-tgt.s: Likewise.
        * ld-mips-elf/empic2-fwd-0.d: New file to test
        R_MIPS_GNU_REL_HI16 and R_MIPS_GNU_REL_LO16 relocation edge
        cases.
        * ld-mips-elf/empic2-fwd-1.d: Likewise.
        * ld-mips-elf/empic2-rev-0.d: Likewise.
        * ld-mips-elf/empic2-rev-1.d: Likewise.
        * ld-mips-elf/empic2-ref.s: Likewise.
        * ld-mips-elf/empic2-space.s: Likewise.
        * ld-mips-elf/empic2-fwd-tgt.s: Likewise.
        * ld-mips-elf/empic2-rev-tgt.s: Likewise.
        * ld-mips-elf/mips-elf.exp: New file to run MIPS 32-bit ELF
        tests (including those above).
2002-01-02 18:59:32 +00:00