Re: [PATCH kvm-unit-tests] x86: avoid multiply defined symbol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxx>

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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux