diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-06-06 13:35:56 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-06-06 13:39:55 +0200 |
commit | d9ff8b3e687a0ec56cac6463ba01ba7775eccd41 (patch) | |
tree | 4f33e2c5fd29e532e3716e97b42e9cfe60bd658b /c | |
parent | bsps/arm: Fix TLB invalidation for ARMv7-A (diff) | |
download | rtems-d9ff8b3e687a0ec56cac6463ba01ba7775eccd41.tar.bz2 |
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?
Diffstat (limited to 'c')
-rw-r--r-- | c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_asm_macros.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_asm_macros.h b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_asm_macros.h index 0e3bc96895..9a303f7b23 100644 --- a/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_asm_macros.h +++ b/c/src/lib/libcpu/powerpc/new-exceptions/bspsupport/ppc_exc_asm_macros.h @@ -168,7 +168,7 @@ ppc_exc_min_prolog_sync_\_NAME: * if what's left compares against the 'ppc_exc_lock_std@sdarel' * address offset then we have a match... */ - cmplwi cr0, \_REG, ppc_exc_lock_std@sdarel + cmplwi cr0, \_REG, ppc_exc_lock_std@sdarel@l .endm |