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.87 #1 (Red Hat Linux)) id 1cQVCE-0004CC-5j for barebox@lists.infradead.org; Mon, 09 Jan 2017 08:20:52 +0000 Date: Mon, 9 Jan 2017 09:20:26 +0100 From: Sascha Hauer Message-ID: <20170109082025.xijkeym5rqdgfv37@pengutronix.de> References: <1483800326-14277-1-git-send-email-opentkernel@163.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1483800326-14277-1-git-send-email-opentkernel@163.com> 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] arm: decalare div0 as weak function To: DU HUANPENG Cc: barebox@lists.infradead.org, Du Huanpeng Hi, On Sat, Jan 07, 2017 at 10:45:26PM +0800, DU HUANPENG wrote: > From: Du Huanpeng > > Signed-off-by: Du Huanpeng > --- > arch/arm/lib/div0.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm/lib/div0.c b/arch/arm/lib/div0.c > index 852cb72..d4f3b6c 100644 > --- a/arch/arm/lib/div0.c > +++ b/arch/arm/lib/div0.c > @@ -17,11 +17,11 @@ > * > */ > #include > +#include > > extern void __div0(void); > > -/* Replacement (=dummy) for GNU/Linux division-by zero handler */ > -void __div0 (void) > +__weak void __div0 (void) Could you explain why and in which situations you need this? Sascha > { > panic("division by zero\n"); > } > -- > 2.7.4 > > > > _______________________________________________ > barebox mailing list > barebox@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/barebox > -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox