[RFD] New binutil 'objsplit'

Dave Korn dk@artimi.com
Wed Apr 21 18:12:00 GMT 2004


> -----Original Message-----
> From: Ian Lance Taylor
> Sent: 21 April 2004 18:50

> "Dave Korn" <dk@artimi.com> writes:
> 
> > 1)  First and foremost, does anyone think this 
> functionality might be of any
> > interest or use to anyone except me?
> 
> I don't know.  I guess my question is: why don't we implement
> -gc-sections more widely?  It seems to me that we can use generic
> mark_hook and sweep_hook functions for most ELF backends, particularly
> most small embedded ELF backends.

  What you say does seem fairly accurate:  most of the [mark/sweep]_hook
functions that I've looked at are clearly cut'n'pastes of each other, and
there certainly could be default generic versions.

>  Why not go that route?  What else do we need?

  Well, for starters, at least one of the backends <koff> isn't actually ELF
at all, but use the generic linker functions on ELF bfds.  That's alright,
albeit slightly inefficient, but to use gc you'd have to fully convert them
to use the elf infrastructure, which is a moderate amount of work; there's
no generic relocate_section routine.  It gets even hairier if there are
howto's with special functions in them.

> 4)  Or should I integrate it into ar, despite the fact that 
> doing so would
> > basically involve large chunks of code duplication from 
> objcopy into ar (all
> > the symbol table gc mechanics, frex) with all the grief 
> that implies.  [ Can
> > you tell I don't like this idea?! ]
> 
> No, yuck.
> 
> Ian


  LOL, I hoped you were going to say that!


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....




More information about the Binutils mailing list