This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: 3.0 mips-sgi-irix6.5: Exception Handling Broken Recently
- To: Jeffrey Oldham <oldham at codesourcery dot com>
- Subject: Re: 3.0 mips-sgi-irix6.5: Exception Handling Broken Recently
- From: Richard Henderson <rth at redhat dot com>
- Date: Mon, 21 May 2001 19:21:42 -0700
- Cc: gcc-bugs at gcc dot gnu dot org
- References: <200105212252.PAA27815@oz.codesourcery.com>
On Mon, May 21, 2001 at 03:52:09PM -0700, Jeffrey Oldham wrote:
> Some time between 18May and 21May, many C++ test executions failed for
> code produced by gcc 3.0 mips-sgi-irix6.5. For example, running this
> simple program:
[...]
> causes a segmentation violation:
I don't see a segv, I see a bus error. It happens, or not,
via luck in how the executable and libraries get layed out
by the linker.
I find it astonishing that the irix assembler does not
propagate the alignment implied by a ".align" directive to
the section header.
This seems to work around the problem.
r~
* config/mips/iris6.h (EH_FRAME_SECTION_ASM_OP): Force alignment
to pointer size.
--- iris6.h.orig Mon May 21 19:02:10 2001
+++ iris6.h Mon May 21 19:13:04 2001
@@ -268,9 +268,12 @@ Boston, MA 02111-1307, USA. */
#if _MIPS_SZPTR == 64
#define CTORS_SECTION_ASM_OP "\t.section\t.ctors,1,2,0,8"
#define DTORS_SECTION_ASM_OP "\t.section\t.dtors,1,2,0,8"
+#define EH_FRAME_SECTION_ASM_OP "\t.section\t.eh_frame,1,2,0,8"
#else /* _MIPS_SZPTR != 64 */
#define CTORS_SECTION_ASM_OP "\t.section\t.ctors,1,2,0,4"
#define DTORS_SECTION_ASM_OP "\t.section\t.dtors,1,2,0,4"
+#define EH_FRAME_SECTION_ASM_OP "\t.section\t.eh_frame,1,2,0,4"
+
#endif /* _MIPS_SZPTR == 64 */
#else /* ! (defined (CRT_BEGIN) || defined (CRT_END)) */
@@ -280,11 +283,9 @@ Boston, MA 02111-1307, USA. */
(Pmode == DImode ? "\t.section\t.ctors,1,2,0,8" : "\t.section\t.ctors,1,2,0,4")
#define DTORS_SECTION_ASM_OP \
(Pmode == DImode ? "\t.section\t.dtors,1,2,0,8" : "\t.section\t.dtors,1,2,0,4")
+#define EH_FRAME_SECTION_ASM_OP \
+ (Pmode == DImode ? "\t.section\t.eh_frame,1,2,0,8" : "\t.section\t.eh_frame,1,2,0,4")
#endif /* defined (CRT_BEGIN) || defined (CRT_END) */
-
-/* dwarf2out will handle padding this data properly. We definitely don't
- want it 8-byte aligned on n32. */
-#define EH_FRAME_SECTION_ASM_OP "\t.section\t.eh_frame,1,2,0,1"
/* A default list of other sections which we might be "in" at any given
time. For targets that use additional sections (e.g. .tdesc) you