This is the mail archive of the binutils@sources.redhat.com 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: MIPS, strip --only-keep-debug & an infinite loop


On Fri, 29 Apr 2005, Daniel Jacobowitz wrote:

> objcopy --only-keep-debug does the same thing to _every_ non-debug
> section.  Take a look at the resulting files.

 Hard to do actually, as `objdump -h' hangs similarly... ;-)

 But I've tried with a different target and the result is weird -- all 
non-debugging sections are merged to overlap starting from the same file 
offset, keeping their sizes, VMA, etc. intact...  Program headers, if 
present, get adjusted accordingly.

> I would not expect --keep-debug to remove non-debug sections, unlike
> --only-keep-debug :-)

 Well, I'm confused about what to expect, especially as documentation 
further states:

`--only-keep-debug'
     Strip a file, removing any sections that would be stripped by
     `--strip-debug' and leaving the debugging sections.

Given what you write, I suppose s/would/would not/ should be applied to 
above.  Am I right?  Then the affected sections should get completely 
removed and not mangled like currently, avoiding the problem altogether.  
Removing ".MIPS.options" alongside ".text", ".data", etc. is of course 
something that's beyond the MIPS64 ELF spec and would be quite a 
reasonable action to perform.

  Maciej


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