diff options
author | Alan Modra <amodra@bigpond.net.au> | 2003-06-07 06:11:18 +0000 |
---|---|---|
committer | Alan Modra <amodra@gcc.gnu.org> | 2003-06-07 15:41:18 +0930 |
commit | ffbc65c3e05de2a9a684d3104b0b75f1f9e7077a (patch) | |
tree | 82cae213b18016f5c76456297556a1e4415f077f | |
parent | 8a5db2b4c44e89eef899f0fceffa00452c17ffd0 (diff) | |
download | gcc-ffbc65c3e05de2a9a684d3104b0b75f1f9e7077a.zip gcc-ffbc65c3e05de2a9a684d3104b0b75f1f9e7077a.tar.gz gcc-ffbc65c3e05de2a9a684d3104b0b75f1f9e7077a.tar.bz2 |
* config/rs6000/linux64.h (CRT_CALL_STATIC_FUNCTION): Define.
From-SVN: r67578
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/config/rs6000/linux64.h | 12 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1398620..1d90325 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2003-06-07 Alan Modra <amodra@bigpond.net.au> + + * config/rs6000/linux64.h (CRT_CALL_STATIC_FUNCTION): Define. + 2003-06-06 James E Wilson <wilson@tuliptree.org> PR inline-asm/10890 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_") |