diff --git a/includes/sys/sdt.h b/includes/sys/sdt.h index ba04c12..fbf5bc3 100644 --- a/includes/sys/sdt.h +++ b/includes/sys/sdt.h @@ -171,9 +171,20 @@ __extension__ extern unsigned long long __sdt_unsp; # define _SDT_ASM_AUTOGROUP "" #endif +/* We used to have just "note", but some assemblers don't support that. + * GAS documents that it should be @note, but since ARM uses @ for + * comments, it also supports %note. It appears we can get away with + * the latter everywhere, so long as we escape it depending on mode. */ +#ifdef __ASSEMBLER__ +#define _SDT_ASM_NOTE %note +#else +#define _SDT_ASM_NOTE %%note +#endif + #define _SDT_ASM_BODY(provider, name, pack_args, args) \ _SDT_ASM_1(990: _SDT_NOP) \ - _SDT_ASM_3( .pushsection .note.stapsdt,_SDT_ASM_AUTOGROUP,"note") \ + _SDT_ASM_3( .pushsection .note.stapsdt,_SDT_ASM_AUTOGROUP, \ + _SDT_ASM_NOTE) \ _SDT_ASM_1( .balign 4) \ _SDT_ASM_3( .4byte 992f-991f, 994f-993f, _SDT_NOTE_TYPE) \ _SDT_ASM_1(991: .asciz _SDT_NOTE_NAME) \