This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

Define DWARF2_FDE_RELOC_SIZE for MIPS


MIPS n64 needs the same treatment as 64-bit HPPA, where absolute FDE
addresses must be 8 rather than 4 bytes in size.

Tested on mips64-linux-gnu.  OK to install?

Richard


gas/
	* config/tc-mips.h (DWARF2_FDE_RELOC_SIZE): Define.

gas/testsuite/
	* gas/mips/cfi-n64-1.s, gas/mips/cfi-n64-1.d: New test.
	* gas/mips/mips.exp: Run it.

Index: gas/config/tc-mips.h
===================================================================
--- gas/config/tc-mips.h	2008-09-04 20:47:38.000000000 +0100
+++ gas/config/tc-mips.h	2008-09-04 20:47:58.000000000 +0100
@@ -168,6 +168,7 @@ #define DWARF2_FORMAT(SEC) mips_dwarf2_f
 
 extern int mips_dwarf2_addr_size (void);
 #define DWARF2_ADDR_SIZE(bfd) mips_dwarf2_addr_size ()
+#define DWARF2_FDE_RELOC_SIZE (mips_dwarf2_addr_size ())
 
 #define TARGET_USE_CFIPOP 1
 
Index: gas/testsuite/gas/mips/cfi-n64-1.s
===================================================================
--- /dev/null	2008-09-03 20:14:33.544096500 +0100
+++ gas/testsuite/gas/mips/cfi-n64-1.s	2008-09-04 20:46:55.000000000 +0100
@@ -0,0 +1,9 @@
+	.global	foo
+	.type	foo,@function
+	.ent	foo
+foo:
+	.cfi_startproc
+	jr	$31
+	nop
+	.cfi_endproc
+	.end	foo
Index: gas/testsuite/gas/mips/cfi-n64-1.d
===================================================================
--- /dev/null	2008-09-03 20:14:33.544096500 +0100
+++ gas/testsuite/gas/mips/cfi-n64-1.d	2008-09-04 20:46:55.000000000 +0100
@@ -0,0 +1,9 @@
+#as: -64 -EB
+#objdump: -sj.eh_frame
+
+.*
+
+Contents of section \.eh_frame:
+ 0000 00000010 00000000 017a5200 017c1f01  .*
+ 0010 0c0d1d00 00000018 00000018 00000000  .*
+ 0020 00000000 00000000 0000000c 00000000  .*
Index: gas/testsuite/gas/mips/mips.exp
===================================================================
--- gas/testsuite/gas/mips/mips.exp	2008-08-16 21:33:27.000000000 +0100
+++ gas/testsuite/gas/mips/mips.exp	2008-09-04 20:46:55.000000000 +0100
@@ -833,4 +833,5 @@ if { [istarget mips*-*-vxworks*] } {
 
     run_dump_test "mips16-vis-1"
     run_dump_test "call-nonpic-1"
+    if $has_newabi { run_dump_test "cfi-n64-1" }
 }


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