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]

Re: gas lobotomy, .bss section optimization


On Tue, May 01, 2001 at 07:27:57AM -0700, Adam J. Richter wrote:
> 	I have written a small BFD program to move variables that
> have been initialized with all zeroes from .data to .bss.  This does
> not shrink a program's RAM image, but it shrinks the program's object
> files and the resultant binary a bit, and it should make the program
> load a microsecond faster.  It may even allow people to cram a few
> more bytes onto Linux boot floppies, and it may be helpful for low
> end embedded applications too.
...

IMHO binutils are the wrong place to do this, it is too late in the game.
If you're trying to move some data from one section to another, how do you
assure that all objects get the alignment they wanted? How can you be sure
that something is not part of a larger object?
This should be done in gcc, enabled by some option (which would not be the
default). In gcc this would be fairly trivial to do.
If you look at the SHF_MERGE thread on gcc lists, you'll see Zack looking
exactly for such feature.

	Jakub


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