The clang 5.0.0 integrated assembler seems to be a little bit more
fussy and doesn't allow the use of the "smc" instructions without
declaring that you want to use the TrustZone architecture extension.
Unfortunately our binutils assembler doesn't recognize the pseudo-op.
So this diff wraps it into an #ifdef.

ok?


Index: arch/armv7/armv7/armv7_start.S
===================================================================
RCS file: /cvs/src/sys/arch/armv7/armv7/armv7_start.S,v
retrieving revision 1.14
diff -u -p -r1.14 armv7_start.S
--- arch/armv7/armv7/armv7_start.S      14 Jun 2017 13:12:49 -0000      1.14
+++ arch/armv7/armv7/armv7_start.S      25 Oct 2017 14:58:40 -0000
@@ -38,6 +38,10 @@
 #undef DOMAIN_CLIENT   /* XXX */
 #include "assym.h"
 
+#ifdef __clang__
+.arch_extension sec
+#endif
+
 #define HVC    .word   0xe1400070              @ hvc
 
        .text

Reply via email to