This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Re: PATCH: Don't align text/data/bss sections in x86 assembler


On 06/03/2013, H.J. Lu wrote:
>  [[snip]]   The section
> alignment is very arbitrary:
> 
> 1. Many arches don't do it.
> 2. Only x86 ELF did it.

x86 ELF did it for a reason.  The default addressing convention for 16-bit sections
(i286) requires paragraph alignment which in hardware is at least 0x10
but in UNIX traditionally was 0x20.  Embedding 16-bit code at the beginning
of a 32-bit .text section was reasonable and did happen.  Recent Linux
no longer supports virtual86 mode, but there are other OS.

> 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.

-- 


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