Author: zhuqing
Date: 2010-12-27 01:24:31 -0500 (Mon, 27 Dec 2010)
New Revision: 3448
Modified:
trunk/osprey/driver/phases.c
trunk/osprey/ipa/common/ipc_compile.cxx
Log:
Fix bug626.
Link with "Scrt1.o,crtbeginS.o,crtendS.o" instead of
"crt1.o,crtbegin.o,crtend.o" when build with Ofast pie executable.
Reviewed by David Coakley.
Modified: trunk/osprey/driver/phases.c
===================================================================
--- trunk/osprey/driver/phases.c 2010-12-23 00:52:44 UTC (rev 3447)
+++ trunk/osprey/driver/phases.c 2010-12-27 06:24:31 UTC (rev 3448)
@@ -1796,9 +1796,15 @@
if ((shared != DSO_SHARED) && (shared != RELOCATABLE)
&& ! option_was_seen(O_nostartfiles))
{
- add_string(args, find_crt_path("crt1.o"));
+ if (option_was_seen(O_pie)) {
+ add_string(args, find_crt_path("Scrt1.o"));
+ add_string(args, find_crt_path("crtbeginS.o"));
+ }
+ else {
+ add_string(args, find_crt_path("crt1.o"));
+ add_string(args, find_crt_path("crtbegin.o"));
+ }
add_string(args, find_crt_path("crti.o"));
- add_string(args, find_crt_path("crtbegin.o"));
if (ftz_crt) {
add_string(args, find_obj_path("ftz.o"));
}
@@ -2246,7 +2252,10 @@
#else
if (ipa == TRUE) {
if (shared != DSO_SHARED && shared != RELOCATABLE) {
- add_string(args, find_crt_path("crtend.o"));
+ if (option_was_seen(O_pie))
+ add_string(args, find_crt_path("crtendS.o"));
+ else
+ add_string(args, find_crt_path("crtend.o"));
#ifndef TARG_SL
add_string(args, find_crt_path("crtn.o"));
#endif
Modified: trunk/osprey/ipa/common/ipc_compile.cxx
===================================================================
--- trunk/osprey/ipa/common/ipc_compile.cxx 2010-12-23 00:52:44 UTC (rev
3447)
+++ trunk/osprey/ipa/common/ipc_compile.cxx 2010-12-27 06:24:31 UTC (rev
3448)
@@ -902,9 +902,12 @@
const char *p;
#ifndef TARG_SL // jczhang: use slcc specific crt*.o
if (((p = strstr(*i, "/crt1.o")) && p[7] == '\0') ||
+ ((p = strstr(*i, "/Scrt1.o")) && p[8] == '\0') ||
((p = strstr(*i, "/crti.o")) && p[7] == '\0') ||
((p = strstr(*i, "/crtbegin.o")) && p[11] == '\0') ||
+ ((p = strstr(*i, "/crtbeginS.o")) && p[12] == '\0') ||
((p = strstr(*i, "/crtend.o")) && p[9] == '\0') ||
+ ((p = strstr(*i, "/crtendS.o")) && p[10] == '\0') ||
((p = strstr(*i, "/crtn.o")) && p[7] == '\0')) {
continue;
}
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Open64-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/open64-devel