From: Florin Iucha <florin-zX39fKdjKLBeoWH0uzbU5w@public.gmane.org>
To: Arnaldo Carvalho de Melo <acme-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: "File has no CTF section."
Date: Tue, 25 Mar 2008 12:24:14 -0500 [thread overview]
Message-ID: <20080325172413.GN3247@iris.iucha.org> (raw)
In-Reply-To: <20080325164103.GC22421-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
[-- Attachment #1.1: Type: text/plain, Size: 1594 bytes --]
Arnaldo,
Thanks for the quick reply!
On Tue, Mar 25, 2008 at 01:41:03PM -0300, Arnaldo Carvalho de Melo wrote:
> > I have three object files: one is 'dwarves.o' from the pahole
> > distribution, compiled with 'gcc -g'. Another is 'foobar.o' from my
> > own embedded application, compiled with the same compiler, on the same
> > box [1]. The third object file is 'foobar.o' compiled with some
> > version of compiler (Metrowerks?) for the embedded platform that we use.
> >
> > If I use 'objdump -W' on all three files, I get heaps of information,
> > including the structure definitions and other stuff. Good.
>
> can you try with:
>
> # binutils
> readelf -w i build/pahole
>
> # elfutils
> eu-readelf -w i build/pahole
Yup. I get the same (or very similar) information.
> > The most puzzling thing is that two object files, compiled with the
> > same compiler on the same machine have different enough DWARF data
> > that one works with pahole and one doesn't.
> >
> > What can I do to follow through with this? Contact the elfutils
> > maintainers?
>
> Possibly, but can you make these two object files available somewhere?
> I'd like to take a look...
See the attached file. If you just compile it with 'gcc -g -c hello.c',
pahole works fine on the resulting object file. If at line 17 you change
'#if 0' to '#if 1', pahole will complain about the lack of CTF (sorry,
I didn't have time to pull your updates).
Cheers,
florin
--
Bruce Schneier expects the Spanish Inquisition.
http://geekz.co.uk/schneierfacts/fact/163
[-- Attachment #1.2: hello.c --]
[-- Type: text/plain, Size: 315 bytes --]
#include <stdio.h>
struct foo
{
int i;
char c;
float f;
};
struct bar
{
struct foo f;
char c;
int i;
};
#if 0
#pragma BSS(".do_not_init")
struct foo f;
#pragma BSS(DEFAULT_SECTION_BSS)
#endif
int main(void)
{
struct bar b;
printf("Hello, struct bar(%u)!\n", sizeof(b));
return 0;
}
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
next prev parent reply other threads:[~2008-03-25 17:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-25 15:24 "File has no CTF section." Florin Iucha
[not found] ` <20080325152403.GK3247-8+3tsXFunua1C7ntjtBYng@public.gmane.org>
2008-03-25 16:41 ` Arnaldo Carvalho de Melo
[not found] ` <20080325164103.GC22421-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2008-03-25 17:24 ` Florin Iucha [this message]
[not found] ` <20080325172413.GN3247-8+3tsXFunua1C7ntjtBYng@public.gmane.org>
2008-03-25 17:57 ` Arnaldo Carvalho de Melo
[not found] ` <20080325175749.GE22421-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2008-04-24 15:25 ` Florin Iucha
[not found] ` <20080424152511.GB19740-8+3tsXFunua1C7ntjtBYng@public.gmane.org>
2008-04-24 15:56 ` Arnaldo Carvalho de Melo
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=20080325172413.GN3247@iris.iucha.org \
--to=florin-zx39fkdjklbeowh0uzbu5w@public.gmane.org \
--cc=acme-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.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