Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@cygnus.com>
To: "H . J . Lu" <hjl@lucon.org>, Andrew Cagney <ac131313@cygnus.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH RFA] partial-stab.h patch amendment
Date: Fri, 07 Sep 2001 09:53:00 -0000	[thread overview]
Message-ID: <1010907165329.ZM10390@ocotillo.lan> (raw)
In-Reply-To: <20010906230028.A9702@lucon.org>

On Sep 6, 11:00pm, H . J . Lu wrote:

> > If you read H.J.'s message, you'll see that __strtol_internal appears
> > in libdl.so.2 as a weak undefined symbol.  It got that way presumably
> > through a bug somewhere else in the toolchain (linker perhaps?) which
> > converted it from a weak defined symbol to a weak undefined symbol.
> > Yet, in the process, the stabs entries related to this symbol weren't
> > removed.  Thus we end up having stabs entries which describe an
> > undefined symbol.
> 
> Is there a way to remove a stabs entry in this case?

In theory, yes.  If the minsym reader kept track of the undefined symbols
that it ran across, the stabs reader could check to see if it's attempting
to read an entry for an undefined symbol and discard it.  However, the
minsym reader (e.g. see elf_symtab_read in elfread.c) doesn't keep track
of the undefined symbols...

In my opinion, it'd be better for some other part of the toolchain
(i.e. not GDB) to remove the appropriate stabs entries when a symbol
is converted from being weak defined to (weak) undefined.  (Is there
any difference between ``undefined'' and ``weak undefined''?)


> I tried your patch on gdb 5.1. It works for me. Can we have it in
> gdb 5.1?

Good question.  I think it should go in, but I'm not the keeper of the
branch.

Andrew, what do you say?


  reply	other threads:[~2001-09-07  9:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-05 15:43 Kevin Buettner
2001-09-05 16:00 ` Kevin Buettner
2001-09-06 10:35 ` Jim Blandy
2001-09-06 13:56   ` Kevin Buettner
     [not found]     ` <1010906232048.ZM8395@ocotillo.lan>
2001-09-06 23:00       ` H . J . Lu
2001-09-07  9:53         ` Kevin Buettner [this message]
2001-09-07 10:02           ` H . J . Lu
2001-09-07 10:31           ` Andrew Cagney
2001-09-07 10:42             ` Elena Zannoni
2001-09-07 14:16             ` Jim Blandy
2001-10-03 18:21             ` Elena Zannoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1010907165329.ZM10390@ocotillo.lan \
    --to=kevinb@cygnus.com \
    --cc=ac131313@cygnus.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=hjl@lucon.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox