* [PATCH] arm: decalare div0 as weak function
@ 2017-01-07 14:45 DU HUANPENG
2017-01-09 8:20 ` Sascha Hauer
0 siblings, 1 reply; 3+ messages in thread
From: DU HUANPENG @ 2017-01-07 14:45 UTC (permalink / raw)
To: barebox; +Cc: Du Huanpeng
From: Du Huanpeng <u74147@gmail.com>
Signed-off-by: Du Huanpeng <u74147@gmail.com>
---
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 <common.h>
+#include <linux/compiler.h>
extern void __div0(void);
-/* Replacement (=dummy) for GNU/Linux division-by zero handler */
-void __div0 (void)
+__weak void __div0 (void)
{
panic("division by zero\n");
}
--
2.7.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm: decalare div0 as weak function
2017-01-07 14:45 [PATCH] arm: decalare div0 as weak function DU HUANPENG
@ 2017-01-09 8:20 ` Sascha Hauer
2017-01-09 13:08 ` Du Huanpeng
0 siblings, 1 reply; 3+ messages in thread
From: Sascha Hauer @ 2017-01-09 8:20 UTC (permalink / raw)
To: DU HUANPENG; +Cc: barebox, Du Huanpeng
Hi,
On Sat, Jan 07, 2017 at 10:45:26PM +0800, DU HUANPENG wrote:
> From: Du Huanpeng <u74147@gmail.com>
>
> Signed-off-by: Du Huanpeng <u74147@gmail.com>
> ---
> 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 <common.h>
> +#include <linux/compiler.h>
>
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-09 13:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-07 14:45 [PATCH] arm: decalare div0 as weak function DU HUANPENG
2017-01-09 8:20 ` Sascha Hauer
2017-01-09 13:08 ` Du Huanpeng
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox