From: Dave Martin Date: Thu, 23 Jun 2011 16:10:05 +0000 (+0100) Subject: ARM: assembler.h: Add string declaration macro X-Git-Tag: v3.0.35-fsl~1232 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8c0ec374b33f971d9eb17d814e560b58e3d29bc9;p=karo-tx-linux.git ARM: assembler.h: Add string declaration macro Declaring strings in assembler source involves a certain amount of tedious boilerplate code in order to annotate the resulting symbol correctly. Encapsulating this boilerplate in a macro should help to avoid some duplication and the occasional mistake. Signed-off-by: Dave Martin Acked-by: Nicolas Pitre Signed-off-by: Huang Shijie --- diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index d42a18b367cd..fed335efda25 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h @@ -298,4 +298,13 @@ .macro ldrusr, reg, ptr, inc, cond=al, rept=1, abort=9001f usracc ldr, \reg, \ptr, \inc, \cond, \rept, \abort .endm + +/* Utility macro for declaring string literals */ + .macro string name:req, string + .type \name , #object +\name: + .asciz "\string" + .size \name , . - \name + .endm + #endif /* __ASM_ASSEMBLER_H__ */