This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
inline assembly statements in C source files using arm security extensions seems to trigger an error
- From: Sean Ansari <zohal52 at yahoo dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 28 Jul 2015 03:41:26 -0700
- Subject: inline assembly statements in C source files using arm security extensions seems to trigger an error
- Authentication-results: sourceware.org; auth=none
I am running into an issue with support for security extensions on ARM. Can anyone suggest a fix?
I have the following code:
#include <stdio.h>
/*__smc(0) void yeild(void);*/
__asm__(" smc #0");
int main(void)
{
unsigned int i;
for (i = 0; i < 10; i++)
{
printf("hello from Normal world\n");
yeild();
}
return 0;
}
And I get the following error:
/tmp/cc2ntayz.s: Assembler messages:
/tmp/cc2ntayz.s:17: Error: selected processor does not support ARM mode `smc #0'
make: *** [/home/sansari/android/gas/obj/local/armeabi/objs/hello_tz/main_normal.o] Error 1
I found this link
https://lists.linaro.org/pipermail/linaro-toolchain/2012-December/002997.html
and this one:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58869
And tried what they suggested by adding the relevant switches to my Android.mk file with a
LOCAL_CFLAGS options. But I still get the same error.