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