From 02b677311ecb1ef2e9a34ca03a20fb33121f82fa Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Sun, 2 Feb 2014 17:12:17 -0500 Subject: nios2.md (load_got_register): Initialize GOT pointer from _gp_got instead of _GLOBAL_OFFSET_TABLE_. 2014-02-02 Sandra Loosemore gcc/ * config/nios2/nios2.md (load_got_register): Initialize GOT pointer from _gp_got instead of _GLOBAL_OFFSET_TABLE_. * config/nios2/nios2.c (nios2_function_profiler): Likewise. libgcc/ * config/nios2/crti.S (_init): Initialize GOT pointer from _gp_got instead of _GLOBAL_OFFSET_TABLE_. From-SVN: r207409 --- gcc/ChangeLog | 6 ++++++ gcc/config/nios2/nios2.c | 4 ++-- gcc/config/nios2/nios2.md | 4 ++-- libgcc/ChangeLog | 5 +++++ libgcc/config/nios2/crti.S | 8 ++++---- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 09b1208..b08ccc9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-02-02 Sandra Loosemore + + * config/nios2/nios2.md (load_got_register): Initialize GOT + pointer from _gp_got instead of _GLOBAL_OFFSET_TABLE_. + * config/nios2/nios2.c (nios2_function_profiler): Likewise. + 2014-02-02 Jan Hubicka * ipa-prop.c (update_jump_functions_after_inlining): When type is not diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c index 7603132..b7e629c 100644 --- a/gcc/config/nios2/nios2.c +++ b/gcc/config/nios2/nios2.c @@ -667,8 +667,8 @@ nios2_function_profiler (FILE *file, int labelno ATTRIBUTE_UNUSED) if (flag_pic) { fprintf (file, "\tnextpc\tr2\n"); - fprintf (file, "\t1: movhi\tr3, %%hiadj(_GLOBAL_OFFSET_TABLE_ - 1b)\n"); - fprintf (file, "\taddi\tr3, r3, %%lo(_GLOBAL_OFFSET_TABLE_ - 1b)\n"); + fprintf (file, "\t1: movhi\tr3, %%hiadj(_gp_got - 1b)\n"); + fprintf (file, "\taddi\tr3, r3, %%lo(_gp_got - 1b)\n"); fprintf (file, "\tadd\tr2, r2, r3\n"); fprintf (file, "\tldw\tr2, %%call(_mcount)(r2)\n"); fprintf (file, "\tcallr\tr2\n"); diff --git a/gcc/config/nios2/nios2.md b/gcc/config/nios2/nios2.md index 7274687..530ce2d 100644 --- a/gcc/config/nios2/nios2.md +++ b/gcc/config/nios2/nios2.md @@ -1015,8 +1015,8 @@ "" "nextpc\\t%0 \\t1: -\\tmovhi\\t%1, %%hiadj(_GLOBAL_OFFSET_TABLE_ - 1b) -\\taddi\\t%1, %1, %%lo(_GLOBAL_OFFSET_TABLE_ - 1b)" +\\tmovhi\\t%1, %%hiadj(_gp_got - 1b) +\\taddi\\t%1, %1, %%lo(_gp_got - 1b)" [(set_attr "length" "12")]) ;; Read thread pointer register diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 58a8cad..3186d06 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,8 @@ +2014-02-02 Sandra Loosemore + + * config/nios2/crti.S (_init): Initialize GOT pointer from + _gp_got instead of _GLOBAL_OFFSET_TABLE_. + 2014-02-02 Richard Sandiford * configure.ac: Check __mips64 when setting host_address. diff --git a/libgcc/config/nios2/crti.S b/libgcc/config/nios2/crti.S index 528c8f3..9f5d523 100644 --- a/libgcc/config/nios2/crti.S +++ b/libgcc/config/nios2/crti.S @@ -56,8 +56,8 @@ _init: addi fp, sp, 8 #ifdef linux nextpc r22 -1: movhi r2, %hiadj(_GLOBAL_OFFSET_TABLE_ - 1b) - addi r2, r2, %lo(_GLOBAL_OFFSET_TABLE_ - 1b) +1: movhi r2, %hiadj(_gp_got - 1b) + addi r2, r2, %lo(_gp_got - 1b) add r22, r22, r2 #endif @@ -80,8 +80,8 @@ _fini: addi fp, sp, 8 #ifdef linux nextpc r22 -1: movhi r2, %hiadj(_GLOBAL_OFFSET_TABLE_ - 1b) - addi r2, r2, %lo(_GLOBAL_OFFSET_TABLE_ - 1b) +1: movhi r2, %hiadj(_gp_got - 1b) + addi r2, r2, %lo(_gp_got - 1b) add r22, r22, r2 #endif -- cgit v1.1