From: David Miller <davem@davemloft.net>
To: gdb@sourceware.org
Subject: symbol versioning...
Date: Sat, 26 Nov 2011 20:56:00 -0000 [thread overview]
Message-ID: <20111126.155633.969368403874195827.davem@davemloft.net> (raw)
I figured I'd ask about this here before I get too deep into trying
to fix this problem.
There are several test cases in the gdb suite which set a breakpoint
on 'printf' and then continue until it hits (f.e. annota1 and annota3).
These all fail on my sparc systems because my libc.so has two printf
symbols, each with a different ELF version. The older version appears
first in the dynamic symbol table, so that's the one which GDB uses, and
it's therefore not the one the executable will actually call.
I can think of two ways to handle this:
1) Look in the executable for dynamic references to the given symbol,
and record the symbol version, and this is the version we'll use when
doing symbol lookups of that symbol.
2) Set the breakpoint in the PLT entry, and using target specific code
that understands how the PLT hopping works, look at how the dynamic
linker resolves the symbol and then record that in the minimal symbol
table and elsewhere.
Has anyone else worked on trying to handle this properly?
next reply other threads:[~2011-11-26 20:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-26 20:56 David Miller [this message]
2011-11-26 21:11 ` Jan Kratochvil
2011-11-26 21:25 ` David Miller
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=20111126.155633.969368403874195827.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=gdb@sourceware.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