[OLPC-devel] Re: linker garbage collection
mtosatti at redhat.com
Thu Aug 31 13:05:49 EDT 2006
On Thu, Aug 31, 2006 at 08:22:57AM -0700, David Woodhouse wrote:
> On Tue, 2006-08-29 at 23:54 -0300, Marcelo Tosatti wrote:
> > * Condition CONFIG_GC_SECTIONS on presence of a recent binutils
> Er, I missed something -- why does this need a recent binutils? We've
> been building kernels with --gc-sections for years, at least on some
First, I think its prudent to guarantee that a well behaved version of
binutils (wrt. garbage collection) is being used. No?
Second reason is the newly added --print-gc-sections option, which:
1) Is used unconditially by the current patch to find out which symbols
have been swept. Such are matched against the list of used symbols
used by compiled modules in the current build, so that the linker can
discard exported but unused functions (and their respective entries in
As you mentioned in the past, that breaks out-of-tree/later compiled
modules, but a vast amount of users never do that (eg embedded systems).
So that behaviour needs to be conditional on a new CONFIG option.
2) Its very useful for developers to
- Debug breakage caused by gc-section misbehaviour.
- Easily check what symbols are being swept.
But I don't have a very strong opinion here, just arguments in favour of
More information about the Devel