diff options
Diffstat (limited to 'gcc')
| -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_") |
