From mboxrd@z Thu Jan 1 00:00:00 1970 From: Angelo Dureghello Date: Fri, 15 Apr 2016 16:39:52 +0200 Subject: [U-Boot] [RFC PATCH] arm, m68k: fix out-of-range jump In-Reply-To: <1460717963-24589-1-git-send-email-hs@denx.de> References: <1460717963-24589-1-git-send-email-hs@denx.de> Message-ID: <5710FD38.2050909@sysam.it> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Heiko, On 15/04/2016 12:59, Heiko Schocher wrote: > fix the following build error for m68k boards: > Building current source for 48 boards (2 threads, 1 job per thread) > m68k: + M54455EVB_i66 > +arch/m68k/cpu/mcf5445x/start.o: In function `_start': > +arch/m68k/cpu/mcf5445x/start.S:668:(.text+0x45a): relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text.board_init_f section in common/built-in.o > +make[1]: *** [u-boot] Error 1 > +make: *** [sub-make] Error 2 > > Signed-off-by: Heiko Schocher > --- > This commit fixes build error: > https://travis-ci.org/hsdenx/u-boot/jobs/123254183 > > fixed log see: > https://travis-ci.org/hsdenx/u-boot/jobs/123281032 > > Any ideas why the changes did not work for: > arch/m68k/cpu/mcf523x/start.S > arch/m68k/cpu/mcf52x2/start.S > arch/m68k/cpu/mcf532x/start.S > > but work for > arch/m68k/cpu/mcf5445x/start.S > > I have no real m68k experiences, so help is appreciated! > > > arch/m68k/cpu/mcf523x/start.S | 4 ++-- > arch/m68k/cpu/mcf52x2/start.S | 4 ++-- > arch/m68k/cpu/mcf532x/start.S | 4 ++-- > arch/m68k/cpu/mcf5445x/start.S | 4 ++-- > 4 files changed, 8 insertions(+), 8 deletions(-) > > diff --git a/arch/m68k/cpu/mcf523x/start.S b/arch/m68k/cpu/mcf523x/start.S > index 8a23e72..ad7bde4 100644 > --- a/arch/m68k/cpu/mcf523x/start.S > +++ b/arch/m68k/cpu/mcf523x/start.S > @@ -141,8 +141,8 @@ _start: > > move.l #__got_start, %a5 /* put relocation table address to a5 */ > > - bsr cpu_init_f /* run low-level CPU init code (from flash) */ > - bsr board_init_f /* run low-level board init code (from flash) */ > + jbsr cpu_init_f /* run low-level CPU init code (from flash) */ > + jbsr board_init_f /* run low-level board init code (from flash) */ > > /* board_init_f() does not return */ > > diff --git a/arch/m68k/cpu/mcf52x2/start.S b/arch/m68k/cpu/mcf52x2/start.S > index 8a59496..a16b589 100644 > --- a/arch/m68k/cpu/mcf52x2/start.S > +++ b/arch/m68k/cpu/mcf52x2/start.S > @@ -198,8 +198,8 @@ _after_flashbar_copy: > > move.l #__got_start, %a5 /* put relocation table address to a5 */ > > - bsr cpu_init_f /* run low-level CPU init code (from flash) */ > - bsr board_init_f /* run low-level board init code (from flash) */ > + jbsr cpu_init_f /* run low-level CPU init code (from flash) */ > + jbsr board_init_f /* run low-level board init code (from flash) */ > > /* board_init_f() does not return */ > > diff --git a/arch/m68k/cpu/mcf532x/start.S b/arch/m68k/cpu/mcf532x/start.S > index 3b9ede0..50d301c 100644 > --- a/arch/m68k/cpu/mcf532x/start.S > +++ b/arch/m68k/cpu/mcf532x/start.S > @@ -155,8 +155,8 @@ _start: > > move.l #__got_start, %a5 /* put relocation table address to a5 */ > > - bsr cpu_init_f /* run low-level CPU init code (from flash) */ > - bsr board_init_f /* run low-level board init code (from flash) */ > + jbsr cpu_init_f /* run low-level CPU init code (from flash) */ > + jbsr board_init_f /* run low-level board init code (from flash) */ > > /* board_init_f() does not return */ > > diff --git a/arch/m68k/cpu/mcf5445x/start.S b/arch/m68k/cpu/mcf5445x/start.S > index ae261b1..ff8d627 100644 > --- a/arch/m68k/cpu/mcf5445x/start.S > +++ b/arch/m68k/cpu/mcf5445x/start.S > @@ -664,8 +664,8 @@ _start: > > move.l #__got_start, %a5 /* put relocation table address to a5 */ > > - bsr cpu_init_f /* run low-level CPU init code (from flash) */ > - bsr board_init_f /* run low-level board init code (from flash) */ > + jbsr cpu_init_f /* run low-level CPU init code (from flash) */ > + jbsr board_init_f /* run low-level board init code (from flash) */ > > /* board_init_f() does not return */ > > I just sent a very similar patch some days ago. https://patchwork.ozlabs.org/patch/609150/ Issue should be fixed. Regards, Angelo