Blame avoid_duplicate_global_symbol_from_asm.patch

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