This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Committed: fix ld-mmix/zeroehelf
- From: Hans-Peter Nilsson <hp at bitrange dot com>
- To: binutils at sourceware dot org
- Date: Fri, 31 Jul 2009 01:02:46 -0400 (EDT)
- Subject: Committed: fix ld-mmix/zeroehelf
IIUC, a change in 2007-12-15 or perhaps already at
2007-04-24 caused .eh_frame contents to be actually parsed and
therefore ld-mmix/zeroehelf to FAIL.
Alan updated the 32-bit-generic-ELF equivalent to this test in
ld-linkonce (which I had completely forgot about!) and went for extra
credits, actually adding a valid .eh_frame entry. I don't have that
ambition, I settle for just changing to the currently lesser parsed
section (but which still zeroes linkonce-removed references without
linker warnings).
Committed.
ld/testsuite:
* ld-mmix/x.s, ld-mmix/y.s, ld-mmix/zeroeh.ld,
ld-mmix/zeroehelf.d, ld-mmix/zeroehmmo.d: Use .gcc_except_table,
not .eh_frame.
Index: x.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-mmix/x.s,v
retrieving revision 1.1
diff -p -u -r1.1 x.s
--- x.s 30 Oct 2001 15:20:14 -0000 1.1
+++ x.s 31 Jul 2009 04:42:50 -0000
@@ -1,8 +1,11 @@
;# Main file, x.s, with the program (_start) referring to two
;# linkonce functions fn and fn2. The functions fn and fn2 are
;# supposed to be equivalent of C++ template instantiations; the
-;# main file instantiates fn. There's the equivalent of an FDE
-;# entry in .eh_frame, referring to fn via a local label.
+;# main file instantiates fn. An exception-table-lookalike entry
+;# refers to fn via a local label. We use .gcc_except_table as we
+;# can't be bothered to produce syntactically valid .eh_frame contents
+;# and there's no option to turn off warning messages for invalid
+;# contents.
.text
.global _start
@@ -20,7 +23,7 @@ L:a:
L:b:
.size fn,L:b-L:a
- .section .eh_frame,"aw",@progbits
+ .section .gcc_except_table,"aw",@progbits
.long 2
.long L:a
.long L:b-L:a
Index: y.s
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-mmix/y.s,v
retrieving revision 1.1
diff -p -u -r1.1 y.s
--- y.s 30 Oct 2001 15:20:14 -0000 1.1
+++ y.s 31 Jul 2009 04:42:50 -0000
@@ -2,8 +2,8 @@
;# that this version of fn has different code, as if compiled
;# with different optimization flags than the one in x.s (not
;# important for this test, though). The reference from
-;# .eh_frame to the linkonce-excluded fn2 must be zero, or g++
-;# EH will not work.
+;# .gcc_except_table to the linkonce-excluded fn2 must be zero,
+;# or g++ EH will not work.
.section .gnu.linkonce.t.fn2,"ax",@progbits
.weak fn2
@@ -23,7 +23,7 @@ L:e:
L:f:
.size fn,L:f-L:e
- .section .eh_frame,"aw",@progbits
+ .section .gcc_except_table,"aw",@progbits
.long 7
.long L:c
.long L:d-L:c
Index: zeroeh.ld
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-mmix/zeroeh.ld,v
retrieving revision 1.1
diff -p -u -r1.1 zeroeh.ld
--- zeroeh.ld 30 Oct 2001 15:20:14 -0000 1.1
+++ zeroeh.ld 31 Jul 2009 04:42:50 -0000
@@ -1,4 +1,4 @@
SECTIONS {
.text 0xa00 : { *(.text); *(.gnu.linkonce.t.*) }
- .eh_frame 0x2000 : { *(.eh_frame) }
+ .gcc_except_table 0x2000 : { *(.gcc_except_table) }
}
Index: zeroehelf.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-mmix/zeroehelf.d,v
retrieving revision 1.1
diff -p -u -r1.1 zeroehelf.d
--- zeroehelf.d 30 Oct 2001 15:20:14 -0000 1.1
+++ zeroehelf.d 31 Jul 2009 04:42:50 -0000
@@ -10,7 +10,7 @@
Contents of section \.text:
0a00 00000a08 00000a10 00000001 00000002 .*
0a10 00000003 .*
-Contents of section \.eh_frame:
+Contents of section \.gcc_except_table:
2000 00000002 00000a08 00000008 00000007 .*
2010 00000a10 00000004 00006066 00000000 .*
2020 00000004 .*
Index: zeroehmmo.d
===================================================================
RCS file: /cvs/src/src/ld/testsuite/ld-mmix/zeroehmmo.d,v
retrieving revision 1.1
diff -p -u -r1.1 zeroehmmo.d
--- zeroehmmo.d 30 Oct 2001 15:20:14 -0000 1.1
+++ zeroehmmo.d 31 Jul 2009 04:42:50 -0000
@@ -10,7 +10,7 @@
Contents of section \.text:
0a00 00000a08 00000a10 00000001 00000002 .*
0a10 00000003 .*
-Contents of section \.eh_frame:
+Contents of section \.gcc_except_table:
2000 00000002 00000a08 00000008 00000007 .*
2010 00000a10 00000004 00006066 00000000 .*
2020 00000004 .*
brgds, H-P