osd-contiki/cpu
Benoît Thébaudeau 0de729572b cc2538: Word-align .data LMA
In order to be fast, the reset_handler() function uses word accesses to
initialize the .data output section. However, most toolchains do not
automatically force the alignment of an output section LMA to use the
maximum alignment of all its input sections. Because of that, assuming
that .data contains some words, the LMA of the .data output section was
not word-aligned in some cases, resulting in an initialization performed
using slow unaligned word accesses.

This commit forces the alignment of the LMA of the .data output section
with a word boundary in order to always use fast aligned word accesses
to read the .data load area.

Note that this solution is better than using ALIGN_WITH_INPUT, both
because the latter is a new feature incompatible with older toolchains,
and because it could create a big gap between _etext and the LMA of
.data if strongly-aligned data were added to .data, although only a word
alignment is required here.

The same considerations apply to the VMA of .data. However, it is
already automatically word-aligned, both because .data contains words,
and because the end VMA of the previous output section (.socdata) is
word-aligned. Moreover, if the VMA of .data were forcibly word-aligned,
then a filled gap could appear at the beginning of this section if
strongly-aligned data were added to it, thus wasting flash memory.
Consequently, it's better not to change anything for the VMA of .data,
all the more it's very unlikely that it does not contain any word and
that the end VMA of .socdata becomes non-word-aligned, and this would
only result in a slower initialization.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
2015-05-23 18:12:54 +02:00
..
6502 Merge remote-tracking branch 'upstream/master' 2015-04-26 14:35:40 +02:00
arm Fix aducrf101 builds with GCC 4.9+ 2015-02-16 14:52:05 -05:00
avr Move MAX, MIN and ABS to sys/cc.h 2015-05-18 08:53:17 +02:00
cc26xx Merge pull request #1074 from g-oikonomou/cc26xx/contrib/new-cc26xxware 2015-05-21 10:01:00 +02:00
cc253x Fix clock.h warnings caused by multiple, conflicting documentation blocks of clock functions 2015-02-15 21:48:30 +01:00
cc2430 Fix clock.h warnings caused by multiple, conflicting documentation blocks of clock functions 2015-02-15 21:48:30 +01:00
cc2538 cc2538: Word-align .data LMA 2015-05-23 18:12:54 +02:00
mc1322x mc1322x: remove rest tutorial 2015-05-14 17:20:46 -04:00
msp430 Merge pull request #809 from cmorty/pull/msp430_gstabs 2015-05-16 11:01:47 +02:00
native Network layer configuration: replace UIP_CONF_* with NETSTACK_CONF_WITH_* 2014-12-01 21:02:57 +01:00
pic32 [cpu/pic32] Removed excess end group 2014-11-10 23:53:33 +01:00
rl78 Move MAX, MIN and ABS to sys/cc.h 2015-05-18 08:53:17 +02:00
stm32w108 Use additive offsets 2015-03-28 17:28:15 +01:00
x86 A massive all-tree automated update of all double inclusion guard #defines that changes from using two underscores as a prefix, which are reserved, to not using two underscores as a prefix 2013-11-24 20:20:11 +01:00