This is the mail archive of the ecos-discuss@sourceware.cygnus.com mailing list for the eCos project.


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

Section alignment question



I just ran into a bug caused by the .data section not being
word-aligned on the ARM target.  I changed the line in target.ld
from

     .data   ALIGN (0x1)  : [...]
to      
     .data   ALIGN (0x4)  : [...]

and now everything is fine.  Obviously the real fix needs to be
further upstream. The target.ld file for arm/pidBE forces the
.bss section to be word aligned, but not any of the others.
AFAICT, they all need to be word aligned (at least they do for
my processor).  Apparently I've just been lucky in the past.

Is this alignment requirement unique to my hardware (Samsung
KS32C5000)?

If not, why hasn't this been a problem before now -- is there
some mechanism (other than luck) that I don't understand (and
have now borken in my new platform configuration) that in the
past causing the other sections to be aligned properly?

-- 
Grant Edwards
grante@visi.com

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