aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2003-06-07 06:11:18 +0000
committerAlan Modra <amodra@gcc.gnu.org>2003-06-07 15:41:18 +0930
commitffbc65c3e05de2a9a684d3104b0b75f1f9e7077a (patch)
tree82cae213b18016f5c76456297556a1e4415f077f /gcc/config
parent8a5db2b4c44e89eef899f0fceffa00452c17ffd0 (diff)
downloadgcc-ffbc65c3e05de2a9a684d3104b0b75f1f9e7077a.zip
gcc-ffbc65c3e05de2a9a684d3104b0b75f1f9e7077a.tar.gz
gcc-ffbc65c3e05de2a9a684d3104b0b75f1f9e7077a.tar.bz2
* config/rs6000/linux64.h (CRT_CALL_STATIC_FUNCTION): Define.
From-SVN: r67578
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/rs6000/linux64.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/config/rs6000/linux64.h b/gcc/config/rs6000/linux64.h
index f611471..8d136fb 100644
--- a/gcc/config/rs6000/linux64.h
+++ b/gcc/config/rs6000/linux64.h
@@ -363,6 +363,18 @@
#undef RS6000_MCOUNT
#define RS6000_MCOUNT "_mcount"
+#ifdef __powerpc64__
+/* _init and _fini functions are built from bits spread across many
+ object files, each potentially with a different TOC pointer. For
+ that reason, place a nop after the call so that the linker can
+ restore the TOC pointer if a TOC adjusting call stub is needed. */
+#define CRT_CALL_STATIC_FUNCTION(SECTION_OP, FUNC) \
+ asm (SECTION_OP "\n" \
+" bl ." #FUNC "\n" \
+" nop\n" \
+" .previous");
+#endif
+
/* FP save and restore routines. */
#undef SAVE_FP_PREFIX
#define SAVE_FP_PREFIX (TARGET_64BIT ? "._savef" : "_savefpr_")