This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Info about struct members in ELF?
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Torsten Mohr <tmohr at s dot netic dot de>
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 7 Nov 2003 19:28:44 +1030
- Subject: Re: Info about struct members in ELF?
- References: <200311070837.54848.tmohr@s.netic.de>
On Fri, Nov 07, 2003 at 08:37:54AM +0100, Torsten Mohr wrote:
> from an ELF file i can get some info about a const struct,
> for example its address, its size and its content.
>
> Does ELF support me somehow in interpreting the content?
>
> For example "member 2 has offset 6 and size 2"?
>
> I don't think i can get this info from the ELF file,
> but the debugger somehow has this information. I
> can't think where else he can get it from.
Yes, this information may be in the debug sections of an ELF file.
The debug info will likely either be DWARF2/3
(http://www.eagercon.com/dwarf/dwarf3std.htm) or STABS
(http://sources.redhat.com/gdb/current/onlinedocs/stabs.html).
--
Alan Modra
IBM OzLabs - Linux Technology Centre