* Can I strip some debug section and why we need to cross-compile readelf
@ 2009-03-08 13:42 loody
2009-03-10 4:06 ` Alan Modra
0 siblings, 1 reply; 4+ messages in thread
From: loody @ 2009-03-08 13:42 UTC (permalink / raw)
To: binutils
Dear all:
Below are my debug section I got:
[11] .debug_line PROGBITS 00000000 12b044 0561d7 00 0 0 1
[12] .debug_info PROGBITS 00000000 18121b 5214b1 00 0 0 1
[13] .debug_abbrev PROGBITS 00000000 6a26cc 03e940 00 0 0 1
[14] .debug_aranges PROGBITS 00000000 6e1010 002f30 00 0 0 8
[15] .debug_pubnames PROGBITS 00000000 6e3f40 00df01 00 0 0 1
[16] .debug_str PROGBITS 00000000 6f1e41 032caa 01 MS 0 0 1
[17] .debug_frame PROGBITS 00000000 724aec 02289c 00 0 0 4
[18] .debug_loc PROGBITS 00000000 747388 0a4e5f 00 0 0 1
[19] .debug_ranges PROGBITS 00000000 7ec1e7 009048 00 0 0 1
When I try to strip "debug_info" section in my program, I find all
debug sections are striped.
Does that mean it is impossible to strip any debug section, since they
have some connection?
BTW, why we need to cross-compile readelf?
In my opinion, readelf is platform independent, since it is used to
parse ELF format, which is a standard, instead of reading the content
of each section like objdump does.
If my assumption is wrong, please correct me.
appreciate your help,
miloody
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can I strip some debug section and why we need to cross-compile readelf
2009-03-08 13:42 Can I strip some debug section and why we need to cross-compile readelf loody
@ 2009-03-10 4:06 ` Alan Modra
2009-03-10 4:23 ` Alan Modra
0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2009-03-10 4:06 UTC (permalink / raw)
To: loody; +Cc: binutils
On Sun, Mar 08, 2009 at 09:42:29PM +0800, loody wrote:
> When I try to strip "debug_info" section in my program, I find all
> debug sections are striped.
objcopy -R .debug_info will just remove the section.
> Does that mean it is impossible to strip any debug section, since they
> have some connection?
They certainly are connected, and stripping .debug_info renders some
of the other sections useless. You can find versions of the dwarf
standard on the web, which will show you the relationship between
sections.
> BTW, why we need to cross-compile readelf?
> In my opinion, readelf is platform independent, since it is used to
> parse ELF format, which is a standard, instead of reading the content
> of each section like objdump does.
> If my assumption is wrong, please correct me.
You might want to run readelf on the target.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can I strip some debug section and why we need to cross-compile readelf
2009-03-10 4:06 ` Alan Modra
@ 2009-03-10 4:23 ` Alan Modra
2009-03-10 4:35 ` Mike Frysinger
0 siblings, 1 reply; 4+ messages in thread
From: Alan Modra @ 2009-03-10 4:23 UTC (permalink / raw)
To: loody, binutils
On Tue, Mar 10, 2009 at 02:36:20PM +1030, Alan Modra wrote:
> You might want to run readelf on the target.
Brain not in gear when I wrote that. Please ignore. Yes, one copy of
readelf out to be able to handle all ELF targets supported by
binutils.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Can I strip some debug section and why we need to cross-compile readelf
2009-03-10 4:23 ` Alan Modra
@ 2009-03-10 4:35 ` Mike Frysinger
0 siblings, 0 replies; 4+ messages in thread
From: Mike Frysinger @ 2009-03-10 4:35 UTC (permalink / raw)
To: binutils; +Cc: Alan Modra, loody
On Tuesday 10 March 2009 00:23:25 Alan Modra wrote:
> On Tue, Mar 10, 2009 at 02:36:20PM +1030, Alan Modra wrote:
> > You might want to run readelf on the target.
>
> Brain not in gear when I wrote that. Please ignore. Yes, one copy of
> readelf out to be able to handle all ELF targets supported by
> binutils.
but not by default ... you have to use the proper configure flags and i doubt
he is doing that ...
-mike
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-10 4:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-08 13:42 Can I strip some debug section and why we need to cross-compile readelf loody
2009-03-10 4:06 ` Alan Modra
2009-03-10 4:23 ` Alan Modra
2009-03-10 4:35 ` Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).