This is the mail archive of the 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: [PATCH] Add --only-keep-debug-and-symbols option to objcopy

On Sat, Jan 10, 2004 at 09:19:21AM +0000, Nick Clifton wrote:
> Hi Daniel,
> >> Following patch on top of Nick's patch from yesterday adds
> >> --only-keep-debug-and-symbols option which does something similar
> >> to eu-strip -f foo.debug foo with the foo.debug file.
> >> Particularly, it keeps debugging sections (like --only-keep-debug),
> >> but also .symtab/.strtab.  Allocated sections are changed into
> >> SHT_NOBITS sections, so that the symbols don't have to be converted
> >> into SHN_ABS symbols.
> >> Ok to commit?
> >
> > Is there any advantage to using --only-keep-debug after this?  i.e.
> > should we just change the behaviour of --only-keep-debug instead?
> I am still in favour of having two separate switches, on the
> grounds that this would fit in with the current way that objcopy
> works, and cause the least disturbance to already existing code.
> It might seem like it would be simpler to just have one switch (like
> "-f" in eu-strip) which does everything, including adding the
> .gnu_debuglink section, stripping out the symbol tables and debug info
> into a separate file and so on.  My concern with this is that it will
> probably require some extensive internal changes to objcopy which are
> bound to introduce new bugs.
> A script can be used to wrap up the entire create-a-stripped-
> executable-and-separate-debug-info process, so why introduce u
> necessary changes into objcopy ?

Hi Nick,

I'm not sure we're talking about the same change.  As I understand it
we have today:
  --only-keep-debug	Removes everything but debug info, including
  --add-gnu-debuglink	Adds .gnu_debuglink

Jakub was proposing to add to that:
			Removes everything but debug info and symtab

I suggested changing --only-keep-debug to keep the symtab, instead of
adding the new option.  I can't tell if you're objecting to that, or
objecting to something like eu-strip -f which combines
--add-gnu-debuglink and --only-keep-debug-and-symbols.

Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

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