iar: Check for wildcards in symbol file

IAR doesn't support wildchars in --keep linker
option.

Signed-off-by: Dávid Házi <david.hazi@arm.com>
Change-Id: If2dce72deb24f847be6e53b489c20113631ddffd
diff --git a/toolchain_IARARM.cmake b/toolchain_IARARM.cmake
index 06391fa..eb99276 100644
--- a/toolchain_IARARM.cmake
+++ b/toolchain_IARARM.cmake
@@ -273,6 +273,11 @@
         ARGS --edit $<TARGET_FILE_DIR:${target}>/iar_steering_file $<TARGET_FILE:${target}> $<TARGET_FILE_DIR:${target}>/${target}${CODE_SHARING_OUTPUT_FILE_SUFFIX}
     )
 
+    string(FIND "${KEEP_SYMBOL_LIST}" "*" wildcard)
+    if(NOT "${wildcard}" EQUAL "-1")
+        message(FATAL_ERROR "Wildcards are not supported in symbol files.")
+    endif()
+
     # Force the target to not remove the symbols if they're unused.
     list(TRANSFORM KEEP_SYMBOL_LIST PREPEND --keep=)
     target_link_options(${target}