Skip to content

Commit 1b1d495

Browse files
committed
FIH: Disable FIH labels on Apple targets
The symbols injected here cause some kind of poor interaction with the linker on MacOS, which results in most of the code becoming hopelessly corrupt. For now, just disable these symbols on this target. Signed-off-by: David Brown <[email protected]>
1 parent 9cc8dac commit 1b1d495

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

boot/bootutil/include/bootutil/fault_injection_hardening.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,8 @@ void fih_cfi_decrement(void);
278278
*/
279279
#if defined(__ICCARM__)
280280
#define FIH_LABEL(str, lin, cnt) __asm volatile ("FIH_LABEL_" str "_" #lin "_" #cnt "::" ::);
281+
#elif defined(__APPLE__)
282+
#define FIH_LABEL(str) do {} while (0)
281283
#else
282284
#define FIH_LABEL(str) __asm volatile ("FIH_LABEL_" str "_%=:" ::);
283285
#endif

0 commit comments

Comments
 (0)