This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] fix solib-svr4.c with 64-bit bfd
- From: Kevin Buettner <kevinb at redhat dot com>
- To: TAKAI Kousuke <takai at vlsi dot kuee dot kyoto-u dot ac dot jp>, gdb-patches at sources dot redhat dot com
- Date: Thu, 17 Jan 2002 12:45:57 -0700
- Subject: Re: [PATCH] fix solib-svr4.c with 64-bit bfd
- References: <firstname.lastname@example.org>
On Jan 18, 4:26am, TAKAI Kousuke wrote:
> I had encountered a bug in GDB 5.1 compiled for sparc-sun-solaris2.8,
> that GDB cannot resolve symbols in shared libraries in 32-bit environment.
> (I found this problem had been reported as PR gdb/266).
> I found that this seems to be because LM_ADDR() in solib-svr4.c
> sign-extends 32-bit address value into 64-bit CORE_ADDR type.
> I have no access to SVR4 spec, but under SunOS 5.7 and 5.8,
> <sys/link.h> says that `l_addr' is unsigned, and it seems that
> l_addr should be zero-extended.
> This is a patch to fix it.
Thanks for your patch.
While your patch fixes the problems that you're seeing on Solaris, it
breaks GDB on certain other platforms. In fact, your patch simply
reverts a change that was made last year to "fix" GDB on one of these
other platforms. I discuss this matter more fully in
I'll be revisiting this matter in a couple of weeks and will fix it
properly then. (The changes are a bit involved.)