32 lines
1.5 KiB
Diff
32 lines
1.5 KiB
Diff
|
From 6872cc5f672da6fce5facebf697415208fe34b12 Mon Sep 17 00:00:00 2001
|
||
|
From: StefanBruens <stefan.bruens@rwth-aachen.de>
|
||
|
Date: Fri, 1 Nov 2019 21:07:33 +0100
|
||
|
Subject: [PATCH] Use local label in inline asm, avoid symbol duplication
|
||
|
|
||
|
The global label "unsupported" may lead to duplicated symbols
|
||
|
when the function is inlined in multiple places. This may happen
|
||
|
in any case, but using LTO exposes this problem reliably.
|
||
|
|
||
|
See https://github.com/ARMmbed/mbed-crypto/issues/312
|
||
|
---
|
||
|
build/premake/premake5/contrib/mbedtls/library/padlock.c | 4 ++--
|
||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/build/premake/premake5/contrib/mbedtls/library/padlock.c b/build/premake/premake5/contrib/mbedtls/library/padlock.c
|
||
|
index b85ff9cd2c..bb0a1ef419 100644
|
||
|
--- a/build/premake/premake5/contrib/mbedtls/library/padlock.c
|
||
|
+++ b/build/premake/premake5/contrib/mbedtls/library/padlock.c
|
||
|
@@ -58,10 +58,10 @@ int mbedtls_padlock_has_support( int feature )
|
||
|
"cpuid \n\t"
|
||
|
"cmpl $0xC0000001, %%eax \n\t"
|
||
|
"movl $0, %%edx \n\t"
|
||
|
- "jb unsupported \n\t"
|
||
|
+ "jb 1f \n\t"
|
||
|
"movl $0xC0000001, %%eax \n\t"
|
||
|
"cpuid \n\t"
|
||
|
- "unsupported: \n\t"
|
||
|
+ "1: \n\t"
|
||
|
"movl %%edx, %1 \n\t"
|
||
|
"movl %2, %%ebx \n\t"
|
||
|
: "=m" (ebx), "=m" (edx)
|