aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJohn David Anglin <dave@hiauly1.hia.nrc.ca>2002-12-09 19:16:14 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2002-12-09 19:16:14 +0000
commit3f320b7e632d87133c9278e0c9d067c2624f2659 (patch)
treefa8417c39084506c90be9397e57219ae9e9f8ddb /gcc
parent3870df966ed749909d751477bb30a9c2d551d507 (diff)
downloadgcc-3f320b7e632d87133c9278e0c9d067c2624f2659.zip
gcc-3f320b7e632d87133c9278e0c9d067c2624f2659.tar.gz
gcc-3f320b7e632d87133c9278e0c9d067c2624f2659.tar.bz2
fptr.c (__canonicalize_funcptr_for_compare): Don't canonicalize function pointers in page 0.
* pa/fptr.c (__canonicalize_funcptr_for_compare): Don't canonicalize function pointers in page 0. From-SVN: r59964
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/pa/fptr.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index cef27a9..c8d682f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2002-12-09 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * pa/fptr.c (__canonicalize_funcptr_for_compare): Don't canonicalize
+ function pointers in page 0.
+
2002-12-09 Steve Ellcey <sje@cup.hp.com>
* config/ia64/hpux.h (TARGET_STRUCT_ARG_REG_LITTLE_ENDIAN): Remove
diff --git a/gcc/config/pa/fptr.c b/gcc/config/pa/fptr.c
index e0bd88a..36ed49c 100644
--- a/gcc/config/pa/fptr.c
+++ b/gcc/config/pa/fptr.c
@@ -64,11 +64,11 @@ __canonicalize_funcptr_for_compare (fptr)
static fixup_t fixup;
unsigned int *plabel, *got;
- /* -1 is special. It is used in crtend to mark the end of a list of
- function pointers. Also return immediately if the plabel bit is
- not set in the function pointer. In this case, the function pointer
- points directly to the function. */
- if ((int) fptr == -1 || !((int) fptr & 2))
+ /* -1 and page 0 are special. -1 is used in crtend to mark the end of
+ a list of function pointers. Also return immediately if the plabel
+ bit is not set in the function pointer. In this case, the function
+ pointer points directly to the function. */
+ if ((int) fptr == -1 || (unsigned int) fptr < 4096 || !((int) fptr & 2))
return (unsigned int) fptr;
/* The function pointer points to a function descriptor (plabel). If