Mail Archives: djgpp/1999/10/05/07:11:41
> > If you think GNU ld should support this feature, I suggest posting to
> > gnu.utils.bug
> I'm fairly sure that this cannot be done using only the information output
> by gcc. To leave out unused functions, you'd need to know the origin and
> size for every symbol, and also be sure that there were no relative offsets
> from one symbol to another, wheras standard object formats only give you
> a block of code with the origin of each symbol, but no size information.
> It might be possible to deduce the other data for gcc output (I don't know
> enough about the compiler to judge that), but certainly isn't possible
> for manually written asm sources, so this wouldn't be a safe optimisation
> to apply.
For that a `helper' file could tell what is safe to trim:
`ld blabla -trim=can_trim.lst'
This file would be produced by the compiler. Or could this information
be appended/inserted into the .o file without breaking its format ?
--
Gautier
_____\\________________\_______\
http://members.xoom.com/gdemont/
- Raw text -