* [PATCH] kallsyms: clean up alignment (potentially save a few bytes on ARM)
@ 2009-10-25 15:05 Alan Jenkins
0 siblings, 0 replies; only message in thread
From: Alan Jenkins @ 2009-10-25 15:05 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: linux-kbuild, linux-kernel
On ARM, .align N means "align to 2^N bytes". What we actually want is
"align to N bytes".
Let's use the .balign directive of gnu as, which is explicitly defined
to address this issue.
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
---
scripts/kallsyms.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 86c3896..55de9e8 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -297,10 +297,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("#else\n");
printf("#define PTR .long\n");
- printf("#define ALGN .align 4\n");
+ printf("#define ALGN .balign 4\n");
printf("#endif\n");
printf("\t.section .rodata, \"a\"\n");
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-10-25 15:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-25 15:05 [PATCH] kallsyms: clean up alignment (potentially save a few bytes on ARM) Alan Jenkins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).