Commit 2d3451ef authored by Josh Poimboeuf's avatar Josh Poimboeuf Committed by Ingo Molnar
Browse files

objtool: Simplify .annotate_insn code generation output some more



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: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarJosh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Link: https://patch.msgid.link/hpsfcihgqmhcdrg7pop7z73ptymakgjq7qlxrawrjxilosk43l@xikqif3ievj4
parent 799647dd
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -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__ */