Build: Fix for small profile support with IARARM.

Compilation with IARARM is failing without this fix.

Change-Id: Icc1ad2a5c48524a4f402d8ceaf137ce2427d6501
Signed-off-by: Michel Jaouen <michel.jaouen@st.com>
diff --git a/secure_fw/spm/cmsis_func/main.c b/secure_fw/spm/cmsis_func/main.c
index 4cbecd8..c889748 100644
--- a/secure_fw/spm/cmsis_func/main.c
+++ b/secure_fw/spm/cmsis_func/main.c
@@ -34,6 +34,8 @@
 #endif
 
 REGION_DECLARE(Image$$, ARM_LIB_STACK,  $$ZI$$Base);
+REGION_DECLARE(Image$$, ARM_LIB_STACK,  $$ZI$$Limit)[];
+REGION_DECLARE(Image$$, ER_INITIAL_PSP,  $$ZI$$Limit)[];
 
 static fih_int tfm_core_init(void)
 {
@@ -141,15 +143,17 @@
 #if !defined(__ICCARM__)
         ".syntax unified                               \n"
 #endif
-        "ldr     r0, =Image$$ARM_LIB_STACK$$ZI$$Limit  \n"
-        "msr     msp, r0                               \n"
-        "ldr     r0, =Image$$ER_INITIAL_PSP$$ZI$$Limit \n"
-        "msr     psp, r0                               \n"
+        "msr     msp, %0                               \n"
+        "msr     psp, %1                               \n"
         "mrs     r0, control                           \n"
         "movs    r1, #2                                \n"
         "orrs    r0, r0, r1                            \n" /* Switch to PSP */
         "msr     control, r0                           \n"
         "bl      c_main                                \n"
+        :
+        : "r" (REGION_NAME(Image$$, ARM_LIB_STACK, $$ZI$$Limit)),
+          "r" (REGION_NAME(Image$$, ER_INITIAL_PSP, $$ZI$$Limit))
+        : "r0", "memory"
     );
 }