This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Trouble eliminating padding or alignments
On Thu, Jul 15, 2010 at 04:27:14PM +0100, Alex Buell wrote:
> How can I eliminate these *fill* bytes?
By not aligning the following section.
> Is the linker intelligent enough
> to discard routines that aren't referenced?
Yes. Use -gc-sections and compile with gcc -ffunction-sections
-fdata-sections. If this is assembly code, put each function in a
separate section, usually named .text.function_name. (You can see
what to do by looking at the output of gcc -ffunction-sections
-fdata-sections -S.)
--
Alan Modra
Australia Development Lab, IBM