From 39bdddcd8c54da501c097e61e925c9f5b0d4165d Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Fri, 26 Jan 2018 21:50:59 +0000 Subject: [PATCH] Now that exit is __dead2, we need to tag ub_exit() as __dead2. To do that, we have to put a while (1); after the syscall that will never return to fake out the compiler.... --- stand/uboot/lib/glue.c | 1 + stand/uboot/lib/glue.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/stand/uboot/lib/glue.c b/stand/uboot/lib/glue.c index 312075ab9882..70a655401c0b 100644 --- a/stand/uboot/lib/glue.c +++ b/stand/uboot/lib/glue.c @@ -187,6 +187,7 @@ ub_reset(void) { syscall(API_RESET, NULL); + while (1); /* Can't tag syscall as __dead2 */ } static struct mem_region mr[UB_MAX_MR]; diff --git a/stand/uboot/lib/glue.h b/stand/uboot/lib/glue.h index 4c2da66ccb27..cb012ed9d8e9 100644 --- a/stand/uboot/lib/glue.h +++ b/stand/uboot/lib/glue.h @@ -78,7 +78,7 @@ void ub_putc(char); void ub_puts(const char *); /* system */ -void ub_reset(void); +void ub_reset(void) __dead2; struct sys_info *ub_get_sys_info(void); /* time */