This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Aligment of data in .text and .data section (Intel/Linux)
- To: Frank Klemm <pfk at fuchs dot offl dot uni-jena dot de>
- Subject: Re: Aligment of data in .text and .data section (Intel/Linux)
- From: Alan Modra <amodra at bigpond dot net dot au>
- Date: Wed, 1 Aug 2001 10:12:57 +0930
- Cc: binutils at sources dot redhat dot com
- References: <20010731171606.C427@fuchs.offl.uni-jena.de>
On Tue, Jul 31, 2001 at 05:16:06PM +0200, Frank Klemm wrote:
>
> How can I EXPLICITELY select an section alignment without patching the *.o
> files? Automatics are fine, I only need a switch to turn them of.
As far as I know, you can't decrease the alignment of an input section.
Your options are:
a) Use different section names. Note that the end of a section
is padded out according to the alignment, so this may not work very
well if you're trying to tack things on to the end of compiler
generated code in .text. Also, you might need to set section
attributes (ie. mark your sections executable) for this to work,
or play with linker scripts.
b) Patch the assembler. Hint: grep for record_alignment.
Alan