From: Hui Zhu <teawater@gmail.com>
To: ineya ineya <ineyaa@gmail.com>
Cc: gdb@sourceware.org
Subject: Re: reconstructing process memory map from core
Date: Wed, 10 Feb 2010 02:41:00 -0000 [thread overview]
Message-ID: <daef60381002091841x2de79c76xcb621c184039d7e7@mail.gmail.com> (raw)
In-Reply-To: <7b8592a1002091400y5b901e90s8cb26f75c057ffab@mail.gmail.com>
Try ".dynamic" for linux.
Hui
On Wed, Feb 10, 2010 at 06:00, ineya ineya <ineyaa@gmail.com> wrote:
> How is symbol loading handled when shared libraries come to play?
>
> This is my story:
> I have a mips embedded device, which has little memory. So I decided
> to dump the heap as the last thing, so in case there is little space
> left on device, I would get at least stack, .got, etc. from binary and
> shared libraries, and heap would be incomplete. I thought, that having
> stack, .got, .dynsym, etc. would be enough for gdb to load symbols
> from all binaries and shared libraries, and I could at least resolve
> symbols from registers or stack.
>
> But it doesn't work, gdb is trying to read something from heap, and if
> this fails, no symbols are loaded. So I was wondering why gdb needs to
> access heap? Or more generally how are symbols loaded / how is the
> process memory map reconstructed from core file?
>
> I thought all that is needed is to have:
> - list of external function - in .dynsym I guess
> - .got from runtime
> and the address where shared library was in memory is computed by data
> present in .got and relative position of function in .so.
>
> Thank you for any hints.
>
prev parent reply other threads:[~2010-02-10 2:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-09 22:00 ineya ineya
2010-02-09 22:08 ` Daniel Jacobowitz
2010-02-10 7:06 ` ineya ineya
2010-02-10 2:41 ` Hui Zhu [this message]
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=daef60381002091841x2de79c76xcb621c184039d7e7@mail.gmail.com \
--to=teawater@gmail.com \
--cc=gdb@sourceware.org \
--cc=ineyaa@gmail.com \
/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