ce426f
From ace889170837e550871cf0d33f88ba2470c7d834 Mon Sep 17 00:00:00 2001
ce426f
From: Alan Modra <amodra@gmail.com>
ce426f
Date: Thu, 28 Mar 2013 12:16:28 -0500
ce426f
Subject: [PATCH 22/42] PowerPC: .eh_frame info in crt1.o isn't useful and
ce426f
 triggers gold bug 14675.
ce426f
ce426f
The .eh_frame info in crt1.o isn't useful and this patch prevents it from
ce426f
being generated on PowerPC.  It triggers the following gold bug:
ce426f
ce426f
http://sourceware.org/bugzilla/show_bug.cgi?id=14675
ce426f
(cherry picked from commit b0f1246ab45b6d27e2bba64aa8dfe407ac740537)
ce426f
---
ce426f
 sysdeps/powerpc/powerpc32/start.S | 7 +++++++
ce426f
 sysdeps/powerpc/powerpc64/start.S | 7 +++++++
ce426f
 3 files changed, 21 insertions(+)
ce426f
ce426f
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/start.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/start.S
ce426f
index 4935e64..2e454c0 100644
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/start.S
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc32/start.S
ce426f
@@ -37,6 +37,13 @@
ce426f
 #include <sysdep.h>
ce426f
 #include "bp-sym.h"
ce426f
 
ce426f
+/* We do not want .eh_frame info for crt1.o since crt1.o is linked
ce426f
+   before crtbegin.o, the file defining __EH_FRAME_BEGIN__.  */
ce426f
+#undef cfi_startproc
ce426f
+#define cfi_startproc
ce426f
+#undef cfi_endproc
ce426f
+#define cfi_endproc
ce426f
+
ce426f
  /* These are the various addresses we require.  */
ce426f
 #ifdef PIC
ce426f
 	.section ".data"
ce426f
diff --git glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/start.S glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/start.S
ce426f
index d9c92d1..aadaf0f 100644
ce426f
--- glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/start.S
ce426f
+++ glibc-2.17-c758a686/sysdeps/powerpc/powerpc64/start.S
ce426f
@@ -37,6 +37,13 @@
ce426f
 #include <sysdep.h>
ce426f
 #include "bp-sym.h"
ce426f
 
ce426f
+/* We do not want .eh_frame info for crt1.o since crt1.o is linked
ce426f
+   before crtbegin.o, the file defining __EH_FRAME_BEGIN__.  */
ce426f
+#undef cfi_startproc
ce426f
+#define cfi_startproc
ce426f
+#undef cfi_endproc
ce426f
+#define cfi_endproc
ce426f
+
ce426f
  /* These are the various addresses we require.  */
ce426f
 #ifdef PIC
ce426f
 	.section ".data.rel.ro.local","aw"
ce426f
-- 
ce426f
1.7.11.7
ce426f