x86: avoid multiply defined symbol
Paolo Bonzini
maintainerPATCH 1/1 x86: avoid multiply defined symbol
Fedora 32 croaks about a symbol that is defined twice, fix it.
Reported-by Dr. David Alan Gilbert <[email protected]>
Signed-off-by Paolo Bonzini <[email protected]>
--- lib/x86/fault_test.c | 2 +- lib/x86/usermode.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
lib/x86/fault_test.c +1 -1
@@ -1,6 +1,6 @@#include "fault_test.h" -jmp_buf jmpbuf; +static jmp_buf jmpbuf;static void restore_exec_to_jmpbuf (void ) {
lib/x86/usermode.c +1 -1
@@ -14,7 +14,7 @@#define USERMODE_STACK_SIZE 0x2000#define RET_TO_KERNEL_IRQ 0x20 -jmp_buf jmpbuf; +static jmp_buf jmpbuf;static void restore_exec_to_jmpbuf (void ) {
Signature · 1 line
2.25.2
Quoted 26 lines · Paolo Bonzini
Fedora 32 croaks about a symbol that is defined twice, fix it.
Reported-by Dr. David Alan Gilbert <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>--- lib/x86/fault_test.c | 2 +- lib/x86/usermode.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)lib/x86/fault_test.c +1
-1@@ -1,6 +1,6 @@#include "fault_test.h" -jmp_buf jmpbuf; +static jmp_buf jmpbuf;static void restore_exec_to_jmpbuf (void ) {lib/x86/usermode.c +0
-0
lib/x86/usermode.c line 17
Quoted 5 lines
lib/x86/usermode.c +1
-1@@ -14,7 +14,7 @@#define USERMODE_STACK_SIZE 0x2000#define RET_TO_KERNEL_IRQ 0x20 -jmp_buf jmpbuf; +static jmp_buf jmpbuf;
Reviewed-by Thomas Huth <[email protected]>
Seems like GCC v10 defaults to -fno-common now? Maybe we should add this to the CFLAGS of the kvm-unit-tests, so that we get the same behavior with all versions of the compiler?
Thomas
Paolo Bonzini
maintainerQuoted 3 lines · Thomas Huth
Seems like GCC v10 defaults to -fno-common now? Maybe we should add this to the CFLAGS of the kvm-unit-tests, so that we get the same behavior with all versions of the compiler?
Yes, good idea.
Paolo