qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] crypto: aes: always rename internal symbols


From: Daniel P. Berrange
Subject: Re: [Qemu-devel] [PATCH] crypto: aes: always rename internal symbols
Date: Tue, 7 Jun 2016 09:21:10 +0100
User-agent: Mutt/1.6.0 (2016-04-01)

On Mon, Jun 06, 2016 at 06:05:35PM -0400, Mike Frysinger wrote:
> From: Mike Frysinger <address@hidden>
> 
> OpenSSL's libcrypto always defines AES symbols with the same names as
> qemu's local aes code.  This is problematic when enabling at least curl
> as that frequently also uses libcrypto.  It might not be noticed when
> running, but if you try to statically link, everything falls down.
> 
> An example snippet:
>   LINK  qemu-nbd
> .../libcrypto.a(aes-x86_64.o): In function 'AES_encrypt':
> (.text+0x460): multiple definition of 'AES_encrypt'
> crypto/aes.o:aes.c:(.text+0x670): first defined here
> .../libcrypto.a(aes-x86_64.o): In function 'AES_decrypt':
> (.text+0x9f0): multiple definition of 'AES_decrypt'
> crypto/aes.o:aes.c:(.text+0xb30): first defined here
> .../libcrypto.a(aes-x86_64.o): In function 'AES_cbc_encrypt':
> (.text+0xf90): multiple definition of 'AES_cbc_encrypt'
> crypto/aes.o:aes.c:(.text+0xff0): first defined here
> collect2: error: ld returned 1 exit status
> .../qemu-2.6.0/rules.mak:105: recipe for target 'qemu-nbd' failed
> make: *** [qemu-nbd] Error 1
> 
> The aes.h header has redefines already for FreeBSD, but go ahead and
> enable that for everyone since there's no real good reason to not use
> a namespace all the time.
> 
> Signed-off-by: Mike Frysinger <address@hidden>
> ---
>  include/crypto/aes.h | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Thanks, applied to the crypto patch queue.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



reply via email to

[Prev in Thread] Current Thread [Next in Thread]