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]

[committed] Fix MIPS eh-frame[34] failures


I've finally got around to fixing the MIPS eh-frame[34] failures that
H-P posted about a while back.  The failures are caused by setting
the personality to an absolute value at assembly time, so that there's
no relocation for it at link time.  I think the reason for doing it like
that was because it's the only way to set the routine to a full 64-bit
value for EABI64 (LP64 on 32-bit ELF).  But that's also why it isn't
particularly interesting.  In practice, no personality routine is going
to live outside the signed 32-bit range, and in practice no .eh_frame
is going to have assembly time addresses.

The point of the test was to make sure that .eh_frame addresses had
the right size (depending on the ABI and .gcc_compiled_longXX section,
etc.).  This is still needed if we define the personality at link time.

Tested on various MIPS targets and applied.

Richard


ld/testsuite/
	* ld-mips-elf/eh-frame1.ld (.gcc_compiled_long32): Add KEEP.
	* ld-mips-elf/eh-frame3.d: Move definition of foo to the link line
	and change to a 32-bit value.  Expect CIEs to be marged.
	* ld-mips-elf/eh-frame4.d: Move definition of foo to the link line.

Index: ld/testsuite/ld-mips-elf/eh-frame1.ld
===================================================================
--- ld/testsuite/ld-mips-elf/eh-frame1.ld	2012-05-13 10:19:16.864701383 +0100
+++ ld/testsuite/ld-mips-elf/eh-frame1.ld	2012-05-13 10:19:18.723701378 +0100
@@ -13,7 +13,7 @@ SECTIONS
   . = 0x30000;
   .eh_frame : { *(.eh_frame) }
   .got : { *(.got) }
-  .gcc_compiled_long32 : { *(.gcc_compiled_long32) }
+  .gcc_compiled_long32 : { KEEP (*(.gcc_compiled_long32)) }
 
   /DISCARD/ : { *(*) }
 }
Index: ld/testsuite/ld-mips-elf/eh-frame3.d
===================================================================
--- ld/testsuite/ld-mips-elf/eh-frame3.d	2012-05-13 10:19:16.864701383 +0100
+++ ld/testsuite/ld-mips-elf/eh-frame3.d	2012-05-13 10:19:18.722701378 +0100
@@ -1,9 +1,9 @@
 #name: MIPS eh-frame 3
 #source: eh-frame1.s
 #source: eh-frame1.s
-#as: -EB -mips3 -mabi=eabi --defsym alignment=3 --defsym fill=0 --defsym foo=0x1020304050607080
+#as: -EB -mips3 -mabi=eabi --defsym alignment=3 --defsym fill=0
 #readelf: -wf
-#ld: -EB -Teh-frame1.ld
+#ld: -EB -Teh-frame1.ld --defsym foo=0x50607080
 #
 # This test is for the official LP64 version of EABI64, which uses a
 # combination of 32-bit objects and 64-bit FDE addresses.
@@ -41,7 +41,7 @@ Contents of the \.eh_frame section:
   Code alignment factor: 1
   Data alignment factor: 4
   Return address column: 31
-  Augmentation data:     00 10 20 30 40 50 60 70 80
+  Augmentation data:     00 00 00 00 00 50 60 70 80
 
   DW_CFA_nop
   DW_CFA_nop
@@ -75,7 +75,7 @@ Contents of the \.eh_frame section:
   Code alignment factor: 1
   Data alignment factor: 4
   Return address column: 31
-  Augmentation data:     50 00 00 00 00 00 00 00 10 20 30 40 50 60 70 80
+  Augmentation data:     50 00 00 00 00 00 00 00 00 00 00 00 50 60 70 80
 
 
 00000108 0000001c 00000024 FDE cie=000000e8 pc=00020120..00020130
@@ -102,7 +102,7 @@ Contents of the \.eh_frame section:
   Code alignment factor: 1
   Data alignment factor: 4
   Return address column: 31
-  Augmentation data:     00 10 20 30 40 50 60 70 80 00
+  Augmentation data:     00 00 00 00 00 50 60 70 80 00
 
   DW_CFA_nop
   DW_CFA_nop
@@ -139,38 +139,20 @@ Contents of the \.eh_frame section:
   DW_CFA_nop
   DW_CFA_nop
 
-000001c8 0000000c 00000000 CIE
-  Version:               1
-  Augmentation:          ""
-  Code alignment factor: 1
-  Data alignment factor: 4
-  Return address column: 31
-
-  DW_CFA_nop
-  DW_CFA_nop
-  DW_CFA_nop
-
-000001d8 00000014 00000014 FDE cie=000001c8 pc=000201d0..000201e0
+000001c8 00000014 000001cc FDE cie=00000000 pc=000201d0..000201e0
 
 # basic1 removed, followed by repeat of above
-000001f0 00000014 0000002c FDE cie=000001c8 pc=000201e0..000201f0
+000001e0 00000014 000001e4 FDE cie=00000000 pc=000201e0..000201f0
 
-00000208 00000014 00000044 FDE cie=000001c8 pc=000201f0..00020210
+000001f8 00000014 000001fc FDE cie=00000000 pc=000201f0..00020210
 
-00000220 00000014 0000005c FDE cie=000001c8 pc=00020210..00020240
+00000210 00000014 00000214 FDE cie=00000000 pc=00020210..00020240
 
-00000238 00000014 00000074 FDE cie=000001c8 pc=00020240..00020280
+00000228 00000014 0000022c FDE cie=00000000 pc=00020240..00020280
 
-00000250 00000014 0000008c FDE cie=000001c8 pc=00020280..000202d0
-
-00000268 0000001c 00000000 CIE
-  Version:               1
-  Augmentation:          "zP"
-  Code alignment factor: 1
-  Data alignment factor: 4
-  Return address column: 31
-  Augmentation data:     00 10 20 30 40 50 60 70 80
+00000240 00000014 00000244 FDE cie=00000000 pc=00020280..000202d0
 
+00000258 0000001c 000001d4 FDE cie=00000088 pc=000202d0..000202e0
   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop
@@ -179,7 +161,7 @@ Contents of the \.eh_frame section:
   DW_CFA_nop
   DW_CFA_nop
 
-00000288 0000001c 00000024 FDE cie=00000268 pc=000202d0..000202e0
+00000278 0000001c 000001f4 FDE cie=00000088 pc=000202e0..00020300
   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop
@@ -188,7 +170,7 @@ Contents of the \.eh_frame section:
   DW_CFA_nop
   DW_CFA_nop
 
-000002a8 0000001c 00000044 FDE cie=00000268 pc=000202e0..00020300
+00000298 0000001c 000001b4 FDE cie=000000e8 pc=00020300..00020310
   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop
@@ -197,16 +179,7 @@ Contents of the \.eh_frame section:
   DW_CFA_nop
   DW_CFA_nop
 
-000002c8 0000001c 00000000 CIE
-  Version:               1
-  Augmentation:          "zP"
-  Code alignment factor: 1
-  Data alignment factor: 4
-  Return address column: 31
-  Augmentation data:     50 00 00 00 00 00 00 00 10 20 30 40 50 60 70 80
-
-
-000002e8 0000001c 00000024 FDE cie=000002c8 pc=00020300..00020310
+000002b8 0000001c 000001d4 FDE cie=000000e8 pc=00020310..00020330
   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop
@@ -215,30 +188,7 @@ Contents of the \.eh_frame section:
   DW_CFA_nop
   DW_CFA_nop
 
-00000308 0000001c 00000044 FDE cie=000002c8 pc=00020310..00020330
-  DW_CFA_nop
-  DW_CFA_nop
-  DW_CFA_nop
-  DW_CFA_nop
-  DW_CFA_nop
-  DW_CFA_nop
-  DW_CFA_nop
-
-00000328 0000001c 00000000 CIE
-  Version:               1
-  Augmentation:          "zPR"
-  Code alignment factor: 1
-  Data alignment factor: 4
-  Return address column: 31
-  Augmentation data:     00 10 20 30 40 50 60 70 80 00
-
-  DW_CFA_nop
-  DW_CFA_nop
-  DW_CFA_nop
-  DW_CFA_nop
-  DW_CFA_nop
-
-00000348 0000001c 00000024 FDE cie=00000328 pc=00020330..00020340
+000002d8 0000001c 00000194 FDE cie=00000148 pc=00020330..00020340
   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop
@@ -249,7 +199,7 @@ Contents of the \.eh_frame section:
 
 # FDE for .discard removed
 # zPR2 removed
-00000368 0000001c 00000044 FDE cie=00000328 pc=00020340..00020370
+000002f8 0000001c 000001b4 FDE cie=00000148 pc=00020340..00020370
   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop
@@ -258,24 +208,13 @@ Contents of the \.eh_frame section:
   DW_CFA_nop
   DW_CFA_nop
 
-00000388 0000001c 00000064 FDE cie=00000328 pc=00020370..000203b0
-  DW_CFA_nop
+00000318 0000001c 000001d4 FDE cie=00000148 pc=00020370..000203b0
   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop
-
-000003a8 0000000c 00000000 CIE
-  Version:               1
-  Augmentation:          ""
-  Code alignment factor: 1
-  Data alignment factor: 4
-  Return address column: 31
-
-  DW_CFA_nop
-  DW_CFA_nop
   DW_CFA_nop
 
-000003b8 00000014 00000014 FDE cie=000003a8 pc=000203b0..000203c0
+00000338 00000014 0000033c FDE cie=00000000 pc=000203b0..000203c0
Index: ld/testsuite/ld-mips-elf/eh-frame4.d
===================================================================
--- ld/testsuite/ld-mips-elf/eh-frame4.d	2012-05-13 10:19:16.864701383 +0100
+++ ld/testsuite/ld-mips-elf/eh-frame4.d	2012-05-13 10:19:18.723701378 +0100
@@ -1,9 +1,9 @@
 #name: MIPS eh-frame 4
 #source: eh-frame1.s
 #source: eh-frame1.s
-#as: -EB -mips3 -mabi=eabi --defsym alignment=2 --defsym fill=0 --defsym foo=0x50607080
+#as: -EB -mips3 -mabi=eabi --defsym alignment=2 --defsym fill=0
 #readelf: -wf
-#ld: -EB -Teh-frame1.ld
+#ld: -EB -Teh-frame1.ld --defsym foo=0x50607080
 #
 # This test is for the semi-official ILP32 variation of EABI64.
 #
@@ -102,107 +102,54 @@ Contents of the \.eh_frame section:
   DW_CFA_nop
   DW_CFA_nop
 
-00000134 0000000c 00000000 CIE
-  Version:               1
-  Augmentation:          ""
-  Code alignment factor: 1
-  Data alignment factor: 4
-  Return address column: 31
-
-  DW_CFA_nop
-  DW_CFA_nop
-  DW_CFA_nop
-
-00000144 0000000c 00000014 FDE cie=00000134 pc=000201d0..000201e0
+00000134 0000000c 00000138 FDE cie=00000000 pc=000201d0..000201e0
 
 # basic1 removed, followed by repeat of above
-00000154 0000000c 00000024 FDE cie=00000134 pc=000201e0..000201f0
-
-00000164 0000000c 00000034 FDE cie=00000134 pc=000201f0..00020210
-
-00000174 0000000c 00000044 FDE cie=00000134 pc=00020210..00020240
+00000144 0000000c 00000148 FDE cie=00000000 pc=000201e0..000201f0
 
-00000184 0000000c 00000054 FDE cie=00000134 pc=00020240..00020280
+00000154 0000000c 00000158 FDE cie=00000000 pc=000201f0..00020210
 
-00000194 0000000c 00000064 FDE cie=00000134 pc=00020280..000202d0
+00000164 0000000c 00000168 FDE cie=00000000 pc=00020210..00020240
 
-000001a4 00000014 00000000 CIE
-  Version:               1
-  Augmentation:          "zP"
-  Code alignment factor: 1
-  Data alignment factor: 4
-  Return address column: 31
-  Augmentation data:     00 50 60 70 80
+00000174 0000000c 00000178 FDE cie=00000000 pc=00020240..00020280
 
-  DW_CFA_nop
-  DW_CFA_nop
-  DW_CFA_nop
+00000184 0000000c 00000188 FDE cie=00000000 pc=00020280..000202d0
 
-000001bc 00000010 0000001c FDE cie=000001a4 pc=000202d0..000202e0
+00000194 00000010 00000138 FDE cie=00000060 pc=000202d0..000202e0
   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop
 
-000001d0 00000010 00000030 FDE cie=000001a4 pc=000202e0..00020300
+000001a8 00000010 0000014c FDE cie=00000060 pc=000202e0..00020300
   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop
 
-000001e4 00000014 00000000 CIE
-  Version:               1
-  Augmentation:          "zP"
-  Code alignment factor: 1
-  Data alignment factor: 4
-  Return address column: 31
-  Augmentation data:     50 00 00 00 50 60 70 80
-
-
-000001fc 00000010 0000001c FDE cie=000001e4 pc=00020300..00020310
+000001bc 00000010 00000120 FDE cie=000000a0 pc=00020300..00020310
   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop
 
-00000210 00000010 00000030 FDE cie=000001e4 pc=00020310..00020330
-  DW_CFA_nop
+000001d0 00000010 00000134 FDE cie=000000a0 pc=00020310..00020330
   DW_CFA_nop
   DW_CFA_nop
-
-00000224 00000014 00000000 CIE
-  Version:               1
-  Augmentation:          "zPR"
-  Code alignment factor: 1
-  Data alignment factor: 4
-  Return address column: 31
-  Augmentation data:     00 50 60 70 80 00
-
   DW_CFA_nop
 
-0000023c 00000010 0000001c FDE cie=00000224 pc=00020330..00020340
+000001e4 00000010 00000108 FDE cie=000000e0 pc=00020330..00020340
   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop
 
 # FDE for .discard removed
 # zPR2 removed
-00000250 00000010 00000030 FDE cie=00000224 pc=00020340..00020370
-  DW_CFA_nop
-  DW_CFA_nop
-  DW_CFA_nop
-
-00000264 00000010 00000044 FDE cie=00000224 pc=00020370..000203b0
+000001f8 00000010 0000011c FDE cie=000000e0 pc=00020340..00020370
   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop
 
-00000278 0000000c 00000000 CIE
-  Version:               1
-  Augmentation:          ""
-  Code alignment factor: 1
-  Data alignment factor: 4
-  Return address column: 31
-
+0000020c 00000010 00000130 FDE cie=000000e0 pc=00020370..000203b0
   DW_CFA_nop
   DW_CFA_nop
   DW_CFA_nop
 
-00000288 0000000c 00000014 FDE cie=00000278 pc=000203b0..000203c0
+00000220 0000000c 00000224 FDE cie=00000000 pc=000203b0..000203c0


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