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]

Question about section alignment


Hello, everyone.
I found that in binutils-2.17.50/gas/config/tc-mips.c there are some
codes as bellows:

     /* 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.  */
     if (strcmp (TARGET_OS, "elf") != 0
         && strcmp (TARGET_OS, "vxworks") != 0)
       {
         (void) bfd_set_section_alignment (stdoutput, text_section, 4);
         (void) bfd_set_section_alignment (stdoutput, data_section, 4);
         (void) bfd_set_section_alignment (stdoutput, bss_section, 4);
       }

I don't kow why these sections  must be set to 16 byte boundaries,
when I changed
the alignment of data_section from 4 to 2 and the test file can also
be run on my
mips target. Could anyone explain it to me ?


Thank you very much.

robert


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