The attached change is preparation for a patch to optimize indirect calls.  For 
this, we need to a
valid function pointer for fixup in __canonicalize_funcptr_for_compare.  The 
least-significant two
bits of the pointer should have the value 2, not 3, when the pointer points to 
a function descriptor.

Tested on hppa-unknown-linux-gnu and committed to trunk.

Dave
--
John David Anglin       dave.ang...@bell.net


2016-06-18  John David Anglin  <dang...@gcc.gnu.org>

        * config/pa/fptr.c (__canonicalize_funcptr_for_compare): Don't set
        least-significant bit in function pointer for fixup.

Index: config/pa/fptr.c
===================================================================
--- config/pa/fptr.c    (revision 237565)
+++ config/pa/fptr.c    (working copy)
@@ -113,7 +113,7 @@
   /* Build a plabel for an indirect call to _dl_fixup.  */
   fixup_plabel[0] = (unsigned int) iptr + 8;   /* address of fixup */
   fixup_plabel[1] = got[-1];                   /* ltp for fixup */
-  fixup = (fixup_t) ((int) fixup_plabel | 3);
+  fixup = (fixup_t) ((int) fixup_plabel | 2);
 
   /* Call fixup to resolve the function address.  got[1] contains the
      link_map pointer and plabel[1] the relocation offset.  */

Reply via email to