All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Florin Iucha <florin-zX39fKdjKLBeoWH0uzbU5w@public.gmane.org>
Cc: dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: "File has no CTF section."
Date: Tue, 25 Mar 2008 13:41:03 -0300	[thread overview]
Message-ID: <20080325164103.GC22421@ghostprotocols.net> (raw)
In-Reply-To: <20080325152403.GK3247-8+3tsXFunua1C7ntjtBYng@public.gmane.org>

Em Tue, Mar 25, 2008 at 10:24:03AM -0500, Florin Iucha escreveu:
> I have manually built the pahole&co on Ubuntu 8.04 beta, and I'm
> trying to use it on a few source files that I have, and I keep getting
> the "File has no CTF section." error message.

Argh, I have to fix that, this just means that the file doesn't have
DWARF info _nor_ CTF info.
 
> 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
 
> If I use 'pahole' on all three files, I get the structure information
> for the first one, but 'File has no CTF section.' for the other two,
> even though the first and second object files are built with the same
> compiler!  And even though both 'foobar.o' file contain heaps of
> debugging information (objdump -W yields 14K lines for the gcc-4.2
> build and 43K lines for the native embedded build).
> 
> I grepped for 'File has no CTF section.' in the dwarves sources and it
> only occurs in the 'ctf_loader.c' file - it seems that the code is
> looking for a section named ".SUNW_ctf" (in function parse_elf which
> is only called from ctf__load which is only called from cus__loadfl,
> if the dwarf__load returns some empty list)
> 
> It seems that either 'dwfl_getdwarf/dwarf_nextcu' fails to find the
> data.  At any rate, the error message (about the missing CTF section)
> is quite misleading.  I'm not sure where the bug is (although my
> limited exploring seems to point to the 'elfutils' package.  Ubuntu
> distributes version 0.131, which seems to be the latest published version.

indeed, misleading it is, fixing now... done
 
> 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...
 
> Thanks,
> florin
> 
> 1: The compiler version is 'gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu6)'
> 
> -- 
> Bruce Schneier expects the Spanish Inquisition.
>       http://geekz.co.uk/schneierfacts/fact/163


--
To unsubscribe from this list: send the line "unsubscribe dwarves" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2008-03-25 16:41 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 [this message]
     [not found]     ` <20080325164103.GC22421-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2008-03-25 17:24       ` Florin Iucha
     [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=20080325164103.GC22421@ghostprotocols.net \
    --to=acme-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=dwarves-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=florin-zX39fKdjKLBeoWH0uzbU5w@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.