[PATCH 03/11] ARM: BUG: Move the section right after the opcode

Sebastian Andrzej Siewior sebastian at breakpoint.cc
Fri Oct 9 15:21:10 PDT 2026


Move the references to the opcode right after the opcode. This requires
to push the section __bug_table first and keep it open. The .rodata.str
section will nest into it but this is not a problem.
This simplifies the splitting later on.

Signed-off-by: Sebastian Andrzej Siewior <sebastian at breakpoint.cc>
---
 arch/arm/include/asm/bug.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/include/asm/bug.h b/arch/arm/include/asm/bug.h
index 4c01e360ccfe0..1bb215367eed2 100644
--- a/arch/arm/include/asm/bug.h
+++ b/arch/arm/include/asm/bug.h
@@ -30,13 +30,13 @@
 #define __BUG__LINE(__file, __line, __value)			\
 	1: ;							\
 	BUG_ENCODING();						\
+	.pushsection __bug_table,"aw";				\
+	.align 2;						\
+	.word 1b;						\
 	.pushsection .rodata.str, "aMS", %progbits, 1;		\
 	2: .asciz  __file;					\
 	.popsection;						\
-	.pushsection __bug_table,"aw";				\
-	.align 2;						\
 	3:							\
-	.word 1b;						\
 	.word 2b;						\
 	.hword __line;						\
 	.hword 0;						\

-- 
2.55.0




More information about the linux-arm-kernel mailing list