This is the mail archive of the
mailing list for the binutils project.
Re: PATCH: Don't align text/data/bss sections in x86 assembler
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jan Beulich <JBeulich at suse dot com>
- Cc: Roland McGrath <mcgrathr at google dot com>, Binutils <binutils at sourceware dot org>
- Date: Mon, 3 Jun 2013 08:27:27 -0700
- Subject: Re: PATCH: Don't align text/data/bss sections in x86 assembler
- References: <20130531173241 dot GA30259 at intel dot com> <51AC6EFE02000078000DA75F at nat28 dot tlf dot novell dot com>
On Mon, Jun 3, 2013 at 1:25 AM, Jan Beulich <JBeulich@suse.com> wrote:
>>>> On 31.05.13 at 19:32, "H.J. Lu" <email@example.com> wrote:
>> There is no need to align text/data/bss sections for ELF in x86
>> assembler. The alignment directive should be used if a symbol needs
>> a specfic alignment. I checked in this patch to avoid align
>> text/data/bss sections in x86 assembler.
> Are you reasonably sure that this will not result in regressions?
> While conceptionally I agree with the change (and never
> understood why the alignment was being enforced), I think such
> a change should only be done by providing a command line option
> to suppress the automatic alignment.
I thought about it and decided against it. The section
alignment is very arbitrary:
1. Many arches don't do it.
2. Only x86 ELF did it.
3. It only aligned text/data/bss sections and there are many
other sections with code and data which aren't aligned.
4. Neither gABI nor psABI require it.