[PATCH 2/2] linkers: Fix for targets with a small-data area

Joel Sherrill joel at rtems.org
Mon Jan 4 19:03:07 UTC 2016


On Mon, Jan 4, 2016 at 12:58 PM, Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

>
>
> ----- Am 4. Jan 2016 um 18:01 schrieb Joel Sherrill joel at rtems.org:
>
> > What exactly does this fix and how does it fix it?
>
> I will add this to the commit message:
>
> On certain targets (e.g. PowerPC) global data below a certain threshold
> (e.g. 8 bytes) may resided in a special memory area, the small-data area.
> This allows more efficient load/store operations.  Placing such data into
> the wrong section (e.g. .rodata) leads to relocation errors during
> link-time.  See test program libtests/dl02 in the RTEMS testsuite.  Using
> an array of unspecified size prevents that the compiler assumes that a
> certain variable is in the small-data area.
>

Thanks. I trusted you that it was an improvement.. Just didn't know how. :)

The small data area can be a pain. On the MIPS, there is a GCC flag to
control the maximum size of a data item allowed to be placed in it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20160104/0f884cce/attachment-0002.html>


More information about the devel mailing list