* [PATCH kvm-unit-tests] x86: avoid multiply defined symbol
@ 2020-05-11 16:59 Paolo Bonzini
2020-05-12 6:01 ` Thomas Huth
0 siblings, 1 reply; 3+ messages in thread
From: Paolo Bonzini @ 2020-05-11 16:59 UTC (permalink / raw)
To: kvm; +Cc: Dr . David Alan Gilbert
Fedora 32 croaks about a symbol that is defined twice, fix it.
Reported-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
lib/x86/fault_test.c | 2 +-
lib/x86/usermode.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/x86/fault_test.c b/lib/x86/fault_test.c
index 078dae3..e15a218 100644
--- a/lib/x86/fault_test.c
+++ b/lib/x86/fault_test.c
@@ -1,6 +1,6 @@
#include "fault_test.h"
-jmp_buf jmpbuf;
+static jmp_buf jmpbuf;
static void restore_exec_to_jmpbuf(void)
{
diff --git a/lib/x86/usermode.c b/lib/x86/usermode.c
index f01ad9b..f032523 100644
--- a/lib/x86/usermode.c
+++ b/lib/x86/usermode.c
@@ -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)
{
--
2.25.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH kvm-unit-tests] x86: avoid multiply defined symbol
2020-05-11 16:59 [PATCH kvm-unit-tests] x86: avoid multiply defined symbol Paolo Bonzini
@ 2020-05-12 6:01 ` Thomas Huth
2020-05-12 8:38 ` Paolo Bonzini
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Huth @ 2020-05-12 6:01 UTC (permalink / raw)
To: Paolo Bonzini, kvm; +Cc: Dr . David Alan Gilbert
On 11/05/2020 18.59, Paolo Bonzini wrote:
> Fedora 32 croaks about a symbol that is defined twice, fix it.
>
> Reported-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> lib/x86/fault_test.c | 2 +-
> lib/x86/usermode.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/x86/fault_test.c b/lib/x86/fault_test.c
> index 078dae3..e15a218 100644
> --- a/lib/x86/fault_test.c
> +++ b/lib/x86/fault_test.c
> @@ -1,6 +1,6 @@
> #include "fault_test.h"
>
> -jmp_buf jmpbuf;
> +static jmp_buf jmpbuf;
>
> static void restore_exec_to_jmpbuf(void)
> {
> diff --git a/lib/x86/usermode.c b/lib/x86/usermode.c
> index f01ad9b..f032523 100644
> --- a/lib/x86/usermode.c
> +++ b/lib/x86/usermode.c
> @@ -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 <thuth@redhat.com>
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH kvm-unit-tests] x86: avoid multiply defined symbol
2020-05-12 6:01 ` Thomas Huth
@ 2020-05-12 8:38 ` Paolo Bonzini
0 siblings, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2020-05-12 8:38 UTC (permalink / raw)
To: Thomas Huth, kvm; +Cc: Dr . David Alan Gilbert
On 12/05/20 08:01, Thomas Huth wrote:
> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-12 8:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-11 16:59 [PATCH kvm-unit-tests] x86: avoid multiply defined symbol Paolo Bonzini
2020-05-12 6:01 ` Thomas Huth
2020-05-12 8:38 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).