Re: [PATCH RFC 5/5] objtool: Improve code generation readability

From: Peter Zijlstra
Date: Wed Apr 09 2025 - 10:46:40 EST


On Tue, Apr 08, 2025 at 01:21:18AM -0700, Josh Poimboeuf wrote:
> Improve the readability and compactness of the objtool annotations.
> This makes it easier to see them and differentiate from other code.
>
> Before:
> -------
>
> 911:
> .pushsection .discard.annotate_insn,"M",@progbits,8
> .long 911b - .
> .long 1
> .popsection
>
> After:
> ------
>
> # <ANNOTATE_NOENDBR>
> 911: .pushsection .discard.annotate_insn,"M",@progbits,8; .long 911b - .; .long 1; .popsection
> # </ANNOTATE_NOENDBR>

Conversely, I don't mind the compact form here too much, since the only
bit that really matters is the annotation type (1, in the above case)
and that is already explicit in the marker (ANNOTATE_NOENDBR).