This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

inline assembly statements in C source files using arm security extensions seems to trigger an error


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. 




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]