From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?J=F6rg?= Krause Date: Wed, 05 Aug 2015 21:17:03 +0200 Subject: [U-Boot] GCC 5.2 issue on imx28 In-Reply-To: References: Message-ID: <1438802223.6328.8.camel@embedded.rocks> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear M?ns Rullg?rd, Otavio Salvador, On Di, 2015-07-28 at 14:39 +0100, M?ns Rullg?rd wrote: > Otavio Salvador writes: [snip] > There are two errors reports: > > 1. An undefined reference to the symbol "lowlevel_init" > 2. A complaint about the ".rel.plt" section not being handled by the > linker script. > > The second error is probably caused by the first. A quick grep turns > up > this snippet in arch/arm/cpu/arm926ejs/mxs/mxs.c: > > /* Lowlevel init isn't used on i.MX28, so just have a dummy here */ > inline void lowlevel_init(void) {} > > The semantics for non-static functions declared inline have changed > in > gcc5, causing the above (empty) function not to be emitted as an > external symbol. > > Since that function is only referenced from start.S, it should not be > declared inline at all. This patch should thus fix your problem: > > diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c > b/arch/arm/cpu/arm926ejs/mxs/mxs.c > index ef130ae..b1d8721 100644 > --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c > +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c > @@ -24,7 +24,7 @@ > DECLARE_GLOBAL_DATA_PTR; > > /* Lowlevel init isn't used on i.MX28, so just have a dummy here */ > -inline void lowlevel_init(void) {} > +void lowlevel_init(void) {} > > void reset_cpu(ulong ignored) __attribute__((noreturn)); > I stumbled over the same problem. Unfortunatly, I did not find this patch before (only the error report from Otavia) and submitted a similar patch [1] which keeps the inline keyword. Best regards J?rg Krause [1] "arm: mxs: make inline function compatible for GCC 5" https://patchwork.ozlabs.org/patch/504043/