]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
objtool: Simplify .annotate_insn code generation output some more
authorJosh Poimboeuf <jpoimboe@kernel.org>
Wed, 3 Dec 2025 18:07:38 +0000 (10:07 -0800)
committerIngo Molnar <mingo@kernel.org>
Wed, 3 Dec 2025 18:45:29 +0000 (19:45 +0100)
Remove the superfluous section name quotes, and combine the longs into a
single command.

Before:

  911: .pushsection ".discard.annotate_insn", "M", @progbits, 8; .long 911b - .; .long 2; .popsection

After:

  911: .pushsection .discard.annotate_insn, "M", @progbits, 8; .long 911b - ., 2; .popsection

No change in functionality.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://patch.msgid.link/hpsfcihgqmhcdrg7pop7z73ptymakgjq7qlxrawrjxilosk43l@xikqif3ievj4
include/linux/annotate.h

index 5efac5d4f9cf89156adb9df11fde4ce61c4b7b2a..2f1599c9e5732307c27320cb5493477ff07e99c2 100644 (file)
@@ -8,33 +8,32 @@
 
 #define __ASM_ANNOTATE(section, label, type)                           \
        .pushsection section, "M", @progbits, 8;                        \
-       .long label - .;                                                \
-       .long type;                                                     \
+       .long label - ., type;                                          \
        .popsection
 
 #ifndef __ASSEMBLY__
 
 #define ASM_ANNOTATE_LABEL(label, type)                                        \
-       __stringify(__ASM_ANNOTATE(".discard.annotate_insn", label, type))
+       __stringify(__ASM_ANNOTATE(.discard.annotate_insn, label, type))
 
 #define ASM_ANNOTATE(type)                                             \
        "911: "                                                         \
-       __stringify(__ASM_ANNOTATE(".discard.annotate_insn", 911b, type))
+       __stringify(__ASM_ANNOTATE(.discard.annotate_insn, 911b, type))
 
 #define ASM_ANNOTATE_DATA(type)                                                \
        "912: "                                                         \
-       __stringify(__ASM_ANNOTATE(".discard.annotate_data", 912b, type))
+       __stringify(__ASM_ANNOTATE(.discard.annotate_data, 912b, type))
 
 #else /* __ASSEMBLY__ */
 
 .macro ANNOTATE type
 .Lhere_\@:
-       __ASM_ANNOTATE(".discard.annotate_insn", .Lhere_\@, \type)
+       __ASM_ANNOTATE(.discard.annotate_insn, .Lhere_\@, \type)
 .endm
 
 .macro ANNOTATE_DATA type
 .Lhere_\@:
-       __ASM_ANNOTATE(".discard.annotate_data", .Lhere_\@, \type)
+       __ASM_ANNOTATE(.discard.annotate_data, .Lhere_\@, \type)
 .endm
 
 #endif /* __ASSEMBLY__ */