Skip site navigation (1)Skip section navigation (2)
Date:      25 Oct 2000 13:46:50 -0400
From:      Randell Jesup <rjesup@wgate.com>
To:        Warner Losh <imp@village.org>
Cc:        obrien@FreeBSD.ORG, Max Khon <fjoe@iclub.nsu.ru>, freebsd-stable@FreeBSD.ORG
Subject:   Re: GDB 4.18 and shared libraries (Mozilla)
Message-ID:  <ybulmvc24qd.fsf@jesup.eng.tvol.net.jesup.eng.tvol.net>
In-Reply-To: Warner Losh's message of "Tue, 17 Oct 2000 18:00:32 -0600"
References:  <ybu1yxgjwqo.fsf@jesup.eng.tvol.net.jesup.eng.tvol.net> <20000919103436.B94601@dragon.nuxi.com> <Pine.BSF.4.21.0009201229450.13341-100000@iclub.nsu.ru> <20000920005447.B97385@dragon.nuxi.com> <200010180000.SAA13097@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Warner Losh <imp@village.org> writes:
>In message <ybu1yxgjwqo.fsf@jesup.eng.tvol.net.jesup.eng.tvol.net> Randell Jesup writes:
>:         Well, personally, as a _user_ of FreeBSD, I don't care who has the
>: finger pointed at them, or who claims "it isn't _our_ bug".  I care that no
>: one can debug a program that uses shared libraries under -STABLE, and I
>: care when it will be fixed.  I don't consider a system I have to patch the
>: loader in order to debug my code to be "STABLE".
>
>No one is arguing with you that there is a bug.  It is a matter of
>finding someone to fix it.

       Fixing it isn't hard...  This fix works just fine.

From: "Bruce Bauman" <bbauman@wgate.com>
Subject: linker bug in FreeBSD 4.x
X-Sent: 6 weeks, 5 days, 21 hours, 55 minutes, 49 seconds ago

There is a bug which is present in all 4.x (and 5.x) versions of FreeBSD
which makes it difficult to debug code in shared libraries.

I will place a new binary on io in ~wgate/ld.shlib-fix. You need to copy
this to /usr/libexec/elf/ld (after saving the previous version of ld), and
rebuild any shared libraries which you wish to debug.

If you do a "make world", you will clobber this change, so beware!

-- Bruce
-- Bruce

Here is a relevant source diff which fixes the bug:

===================================================================
RCS file: /cvs/src/src/bfd/elf32-i386.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- src/bfd/elf32-i386.c 2000/03/01 19:40:53 1.8
+++ src/bfd/elf32-i386.c 2000/04/20 05:37:05 1.9
@@ -1291,7 +1291,9 @@
         sections against symbols defined externally
         in shared libraries.  We can't do anything
         with them here.  */
-     || (input_section->flags & SEC_DEBUGGING) != 0)))
+     || ((input_section->flags & SEC_DEBUGGING) != 0
+         && (h->elf_link_hash_flags
+      & ELF_LINK_HASH_DEF_DYNAMIC) != 0))))
   {
     /* In these cases, we don't need the relocation
                      value.  We check specially because in some

-- 
Randell Jesup, Worldgate Communications, ex-Scala, ex-Amiga OS team ('88-94)
rjesup@wgate.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ybulmvc24qd.fsf>