Module Name: src
Committed By: mrg
Date: Mon Sep 7 00:47:27 UTC 2020
Modified Files:
src/sys/arch/amd64/amd64: machdep.c
Log Message:
adjust some fallback code to be slightly less ugly and avoid
upsetting GCC 9.
To generate a diff of this commit:
cvs rdiff -u -r1.356 -r1.357 src/sys/arch/amd64/amd64/machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.356 src/sys/arch/amd64/amd64/machdep.c:1.357
--- src/sys/arch/amd64/amd64/machdep.c:1.356 Tue Jul 14 00:45:52 2020
+++ src/sys/arch/amd64/amd64/machdep.c Mon Sep 7 00:47:27 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.356 2020/07/14 00:45:52 yamaguchi Exp $ */
+/* $NetBSD: machdep.c,v 1.357 2020/09/07 00:47:27 mrg Exp $ */
/*
* Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -110,7 +110,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.356 2020/07/14 00:45:52 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.357 2020/09/07 00:47:27 mrg Exp $");
#include "opt_modular.h"
#include "opt_user_ldt.h"
@@ -1518,9 +1518,12 @@ init_x86_64_ksyms(void)
tesym = (vaddr_t)symtab->esym + KERNBASE;
#endif
ksyms_addsyms_elf(symtab->nsym, (void *)tssym, (void *)tesym);
- } else
- ksyms_addsyms_elf(*(long *)(void *)&end,
- ((long *)(void *)&end) + 1, esym);
+ } else {
+ uintptr_t endp = (uintptr_t)(void *)&end;
+
+ ksyms_addsyms_elf(*(long *)endp,
+ ((long *)endp) + 1, esym);
+ }
#endif
}
#endif /* XENPV */