lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4AE46934.2000203@tuffmail.co.uk>
Date:	Sun, 25 Oct 2009 15:05:24 +0000
From:	Alan Jenkins <alan-jenkins@...fmail.co.uk>
To:	Sam Ravnborg <sam@...nborg.org>
CC:	linux-kbuild@...r.kernel.org,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH] kallsyms: clean up alignment (potentially save a few bytes
 on ARM)

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@...fmail.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");

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ