From: Joel Brobecker <brobecker@adacore.com>
To: Randolph Chung <randolph@tausq.org>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA/hpux] SEGV when running program using dlopen
Date: Wed, 15 Dec 2004 17:23:00 -0000 [thread overview]
Message-ID: <20041215165738.GQ964@adacore.com> (raw)
In-Reply-To: <20041215163628.GY29171@tausq.org>
> since we are already doing this in an ALL_OBJFILES loop, how come we
> don't find the right symbol?
The answer is in the body of lookup_minimal_symbol_solib_trampoline().
It iterates over all msymbols of the objfile, and returns the first
one whose name matches *and* whose ``MSYMBOL_TYPE (msymbol) ==
mst_solib_trampoline''. See minsyms.c, around line 353.
Since in our case, the symbol we're looking for is not inside
a shared library, the lookup always fails.
I was also wondering whether the current code might be working
by pure luck in the other case. Assuming that the objfile contains
two symbols (one stub, one function) in the shared library, what
guaranty do we have that the lookup will find the one we're looking
for?
> i also notice that the problem only occurs when you link in end.o;
> what does that do?
AFAIK, it provides some help in debugging by exporting some specified
symbols. The only use I know of if with shared libraries...
--
Joel
next prev parent reply other threads:[~2004-12-15 17:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-15 9:20 Joel Brobecker
2004-12-15 17:14 ` Randolph Chung
2004-12-15 17:23 ` Joel Brobecker [this message]
2004-12-15 17:27 ` Randolph Chung
2004-12-15 18:29 ` Joel Brobecker
2004-12-17 7:15 ` Joel Brobecker
2004-12-17 7:44 ` Randolph Chung
2004-12-17 19:22 ` Joel Brobecker
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=20041215165738.GQ964@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sources.redhat.com \
--cc=randolph@tausq.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