This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can I strip some debug section and why we need to cross-compile readelf


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]