From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1i0mpx-0001Vb-Rp for barebox@lists.infradead.org; Thu, 22 Aug 2019 13:09:11 +0000 Message-ID: <8a7f0509c547f4803a270dbfd93f4dba21cd388b.camel@pengutronix.de> From: Rouven Czerwinski Date: Thu, 22 Aug 2019 15:09:08 +0200 In-Reply-To: <20190822125158.10296-2-s.hauer@pengutronix.de> References: <20190822125158.10296-1-s.hauer@pengutronix.de> <20190822125158.10296-2-s.hauer@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: Re: [PATCH 1/8] ARM: aarch64: Fixup relocation table for the second relocation To: Sascha Hauer , Barebox List On Thu, 2019-08-22 at 14:51 +0200, Sascha Hauer wrote: > In case we want to relocate the binary multiple times we have to > adjust the relocation table itself for any further relocations. > > Signed-off-by: Sascha Hauer > --- > arch/arm/cpu/common.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/arm/cpu/common.c b/arch/arm/cpu/common.c > index 4d957da1dc..c81b2b3791 100644 > --- a/arch/arm/cpu/common.c > +++ b/arch/arm/cpu/common.c > @@ -84,6 +84,8 @@ void relocate_to_current_adr(void) > unsigned long *fixup = (unsigned long *)(rel- > >r_offset + offset); > > *fixup = rel->r_addend + offset; > + rel->r_addend += offset; > + rel->r_offset += offset; > } else { > putc_ll('>'); > puthex_ll(rel->r_info); Acked-by: Rouven Czerwinski - rcz _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox