Patchwork [committed,ia64] Patch to fix IA64 HP-UX bootstrap, PR 44716

login
register
mail settings
Submitter Steve Ellcey
Date Oct. 1, 2010, 5:06 p.m.
Message ID <201010011706.o91H6qG11940@lucas.cup.hp.com>
Download mbox | patch
Permalink /patch/66448/
State New
Headers show

Comments

Steve Ellcey - Oct. 1, 2010, 5:06 p.m.
I am checking in the attached patch to fix the IA64 HP-UX bootstrap failure.

The bootstrap failure described in PR 44716 is caused by a bug in the HP
linker which causes a segfault when a function in .text.unlikely calls a
function in .text.  I think there is also a bug in GCC causing functions
that never used to be put into .text.unlikely to be put there.  This GCC
bug is covered under a separate bug (PR 45781).  This patch stops GCC from
using .text.unlikely and .text.hot on IA64 HP-UX and allows us to
bootstrap.

Honza, should we close this bug since we have PR 45781 to describe the
generic question of whether or not we are putting the right things in
.text.unlikely?

Steve Ellcey
sje@cup.hp.com


2010-10-01  Steve Ellcey  <sje@cup.hp.com>

	PR 44716
	* config/ia64/hpux.h (UNLIKELY_EXECUTED_TEXT_SECTION_NAME): Define.
	(HOT_TEXT_SECTION_NAME): Define.

Patch

Index: config/ia64/hpux.h
===================================================================
--- config/ia64/hpux.h	(revision 164824)
+++ config/ia64/hpux.h	(working copy)
@@ -215,3 +215,14 @@  do {								\
 
 #undef HANDLE_PRAGMA_PACK_PUSH_POP
 #define HANDLE_PRAGMA_PACK_PUSH_POP
+
+/* The HP-UX linker has a bug that causes calls from functions in
+   .text.unlikely to functions in .text to cause a segfault.  Until
+   it is fixed, prevent code from being put into .text.unlikely or
+   .text.hot.  */
+
+#undef UNLIKELY_EXECUTED_TEXT_SECTION_NAME
+#define UNLIKELY_EXECUTED_TEXT_SECTION_NAME ".text"
+
+#undef HOT_TEXT_SECTION_NAME
+#define HOT_TEXT_SECTION_NAME ".text"