Re: [PATCH v2 04/12] objtool: Convert instrumentation_{begin,end}() to ANNOTATE
From: Josh Poimboeuf
Date: Fri Nov 15 2024 - 14:03:41 EST
On Mon, Nov 11, 2024 at 12:59:39PM +0100, Peter Zijlstra wrote:
> +++ b/include/linux/objtool.h
> @@ -51,13 +51,16 @@
> ".long 998b\n\t" \
> ".popsection\n\t"
>
> -#define ASM_ANNOTATE(x) \
> - "911:\n\t" \
> +#define __ASM_ANNOTATE(s, x) \
> ".pushsection .discard.annotate,\"M\",@progbits,8\n\t" \
> - ".long 911b - .\n\t" \
> + ".long " __stringify(s) "b - .\n\t" \
It would probably be better for __ASM_ANNOTATE's callers to pass in the
full label name (e.g. '911b') since they know where the label is? It
could even be a named label.
--
Josh