This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Change idt64.ld to also accept MIPS32r2 objects


Adam Nemet wrote:
When testing GCC with the mips-sim-idt64 board, the -mips32r2 multilib from
the mips64r2-elfoabi configuration fails to link.  (Note that this is not an
r2-only issue, mips64-elfoabi would fail similarly.)

idt64.ld sets OUTPUT_ARCH to isa64 which neither extends nor is a subset of
isa32r2.  To fix this, the patch below changes OUTPUT_ARCH to isa64r2.  I also
extended the comment to explain why setting the ISA in OUTPUT_ARCH is
necessary.

With this I was able to test -mips32r2 on mips-sim-idt64.  Also GCC
testresults are identical for mipsisa64r2-elfoabi with the default multilib
before and after.

OK to install? (I have commit access to src.)

Should I also change idt32.ld to isa32r2 for consistency?

Assuming this doesn't cause any regressions for any of the other multilib configurations please go ahead. The same applies to the proposed idt32.ld change.

-- Jeff J.
Adam

	* mips/idt64.ld: Set arch to mips:isa64r2 from mips:isa64.  Update
	comment.

Index: idt64.ld
===================================================================
RCS file: /cvs/src/src/libgloss/mips/idt64.ld,v
retrieving revision 1.9
diff -u -r1.9 idt64.ld
--- idt64.ld 8 Jun 2006 16:13:11 -0000 1.9
+++ idt64.ld 2 Dec 2008 06:27:58 -0000
@@ -1,9 +1,11 @@
/* The following TEXT start address leaves space for the monitor
- workspace. This linker script links isa32 programs for use with the
- simulator. */
+ workspace. This linker script links ISA64r2 programs for use with the
+ simulator. We set the ISA explicitly so that we can link objects of
+ different ISAs that are subsets of ISA64r2 but are not extensions of
+ each other (e.g., MIPS32r2 and MIPS64). */
ENTRY(_start)
-OUTPUT_ARCH("mips:isa64")
+OUTPUT_ARCH("mips:isa64r2")
OUTPUT_FORMAT("elf32-littlemips", "elf32-bigmips", "elf32-littlemips")
GROUP(-lc -lidt -lgcc)
SEARCH_DIR(.)




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]