Sebastian Huber d9ff8b3e68 bsps/powerpc: Fix potential relocation truncation
See also

https://sourceware.org/ml/binutils/2014-06/msg00059.html

On Fri, Jun 06, 2014 at 11:01:10AM +0200, Sebastian Huber wrote:
> I performed a git bisect and found this:
>
> 93d1b056cb396d6468781fe0e40dd769891bed32 is the first bad commit
> commit 93d1b056cb396d6468781fe0e40dd769891bed32
> Author: Alan Modra <amodra@gmail.com>
> Date:   Tue May 20 11:42:42 2014 +0930
>
>     Rewrite ppc32 backend .sdata and .sdata2 handling

Hmm, I'm surprised that your git bisect found this patch.  Was
_SDA_BASE_ set differently before this?

>                 0x00000000000dfc00                _SDA_BASE_
>                 0x00000000000d7f78                ppc_exc_lock_std

>      4b8:       28 05 00 00     cmplwi  r5,0
>                         4ba: R_PPC_SDAREL16     ppc_exc_lock_std

ppc_exc_lock_std@sdarel will be calculating 0xd7f78 - 0xdfc00
which is 0xf...fff8378, and that falls foul of

commit 86c9573369616e7437481b6e5533aef3a435cdcf
Author: Alan Modra <amodra@gmail.com>
Date:   Sat Mar 8 13:05:06 2014 +1030

    Better overflow checking for powerpc32 relocations

cmplwi has an *unsigned* 16-bit field, and we now check the overflow
properly.

I wonder how many more of these we'll hit, and whether the uproar will
be enough that I'll be forced to relax the checks?
2014-06-06 13:39:55 +02:00
2014-06-03 12:01:13 +02:00
2013-05-27 14:47:20 +02:00
2013-06-18 13:38:31 +02:00
2013-05-27 14:47:20 +02:00
2013-06-18 13:38:31 +02:00
2012-10-09 19:26:51 +02:00
2013-09-19 13:16:06 +02:00
2013-05-27 14:47:20 +02:00
2013-05-27 14:47:20 +02:00
2013-05-01 10:13:08 -05:00
2013-05-27 14:47:20 +02:00

This is the Real-Time Executive for Multiprocessing Systems (RTEMS).
The version number for this software is indicated in the VERSION file.

See the documentation manuals in doc/ with daily builds available online at
http://rtems.org/onlinedocs/doc-current/share/rtems/html/ and released builds
at http://www.rtems.org/onlinedocs/releases/ for information on building,
installing, and using RTEMS. The INSTALL file tells you to come back here.

See the RTEMS Wiki at http://wiki.rtems.org/wiki/index.php/Main_Page
for community knowledge and tutorials.

RTEMS Doxygen available at http://www.rtems.org/onlinedocs/doxygen/cpukit/html

Get help on the mailing lists:
* For general-purpose questions related to using RTEMS, use the
  rtems-users ml: http://www.rtems.org/mailman/listinfo/rtems-users
* For questions and discussion related to development of RTEMS, use the
  rtems-devel ml: http://www.rtems.org/mailman/listinfo/rtems-devel

See http://www.rtems.org/bugzilla/ to report a bug.

Description
RTEMS is a ​real-time executive in use by embedded systems applications around the world and beyond
Readme 126 MiB
Languages
C 93.9%
Assembly 3.4%
Ada 1.4%
Python 0.3%
HTML 0.3%
Other 0.4%