bug fix for ia64/dl-fptr.c
David Mosberger
davidm@napali.hpl.hp.com
Mon Sep 30 16:54:00 GMT 2002
The ia64 version of dl-fptr.c has a bug in that it incorrectly assumes
that the "local" variable will be within a 22-bit offset of gp. The
fix is to use "movl" instead so that "local" can be anywhere in the
64-bit address space.
Thanks to Asit Mallick for reporting this bug.
--david
2002-09-19 David Mosberger <davidm@hpl.hp.com>
* sysdeps/ia64/dl-fptr.c (make_fdesc): Load address of "local" via
a 64-bit gp-relative address to enable binaries with large data
sections.
Index: sysdeps/ia64/dl-fptr.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/ia64/dl-fptr.c,v
retrieving revision 1.6
diff -u -r1.6 dl-fptr.c
--- sysdeps/ia64/dl-fptr.c 31 Jan 2002 03:39:21 -0000 1.6
+++ sysdeps/ia64/dl-fptr.c 20 Sep 2002 01:38:17 -0000
@@ -127,7 +127,7 @@
unsigned int old;
struct local *l;
- asm ("addl %0 = @gprel (local), gp" : "=r" (l));
+ asm ("movl %0 = @gprel (local);; add %0 = %0, gp" : "=&r"(l));
t = l->root;
while (1)
More information about the Libc-hacker
mailing list