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: Question about section alignment


Hi Robert,

I found that in binutils-2.17.50

(Just a quick aside - we have now released version 2.18 and development on 2.19 continues apace...)



     /* On a native system other than VxWorks, sections must be aligned
        to 16 byte boundaries.  When configured for an embedded ELF
        target, we don't bother.  */

I don't kow why these sections must be set to 16 byte boundaries,

I asked the MIPS maintainers about this - the consensus was that 16 bytes was chosen for future compatibility with MIPS variants that might need that alignment for 128-bit data types (eg long doubles). There are no such variants yet, but they may appear one day.


If you find that reducing the alignment restriction to 4 bytes works for you (and produces some kind of space saving) then by all means carry on doing that, but the official MIPS port is going to keep the 16 byte alignment requirement just in case it is needed in the future.

Cheers
  Nick


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