[lkml]   [2018]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] kallsyms: lower alignment on ARM
As mentioned in the info pages of gas, the '.align' pseudo op's
interpretation of the alignment value is architecture specific.
It might either be a byte value or taken to the power of two.

On ARM it's actually the latter which leads to unnecessary large
alignments of 16 bytes for 32 bit builds or 256 bytes for 64 bit

Fix this by switching to '.balign' instead which is consistent
across all architectures.

Signed-off-by: Mathias Krause <>
Cc: Catalin Marinas <>
Cc: Will Deacon <>
scripts/kallsyms.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 109a1af7e444..77cebad0474e 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -334,10 +334,10 @@ static void write_src(void)
printf("#include <asm/types.h>\n");
printf("#if BITS_PER_LONG == 64\n");
printf("#define PTR .quad\n");
- printf("#define ALGN .align 8\n");
+ printf("#define ALGN .balign 8\n");
printf("#define PTR .long\n");
- printf("#define ALGN .align 4\n");
+ printf("#define ALGN .balign 4\n");

printf("\t.section .rodata, \"a\"\n");
 \ /
  Last update: 2018-12-30 13:36    [W:0.027 / U:0.652 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site