All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: linux-kbuild@vger.kernel.org
Cc: Michal Marek <michal.lkml@markovi.net>,
	Masahiro Yamada <yamada.masahiro@socionext.com>
Subject: [PATCH v2] kallsyms: reduce size a little on 64-bit
Date: Mon, 03 Sep 2018 06:09:34 -0600	[thread overview]
Message-ID: <5B8D247E02000078001E48EC@prv1-mh.provo.novell.com> (raw)
In-Reply-To: 5B8563A702000078001E2A82@prv1-mh.provo.novell.com

Both kallsyms_num_syms and kallsyms_markers[] don't really need to use
unsigned long as their (base) types; unsigned int fully suffices.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v2: Drop unrelated hunk.
---
 kernel/kallsyms.c  |    4 ++--
 scripts/kallsyms.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

--- 4.19-rc2/kernel/kallsyms.c
+++ 4.19-rc2-kallsyms-reduce-size/kernel/kallsyms.c
@@ -37,7 +37,7 @@ extern const u8 kallsyms_names[] __weak;
  * Tell the compiler that the count isn't in the small data section if the arch
  * has one (eg: FRV).
  */
-extern const unsigned long kallsyms_num_syms
+extern const unsigned int kallsyms_num_syms
 __attribute__((weak, section(".rodata")));
 
 extern const unsigned long kallsyms_relative_base
@@ -46,7 +46,7 @@ __attribute__((weak, section(".rodata"))
 extern const u8 kallsyms_token_table[] __weak;
 extern const u16 kallsyms_token_index[] __weak;
 
-extern const unsigned long kallsyms_markers[] __weak;
+extern const unsigned int kallsyms_markers[] __weak;
 
 /*
  * Expand a compressed symbol data into the resulting uncompressed string,
--- 4.19-rc2/scripts/kallsyms.c
+++ 4.19-rc2-kallsyms-reduce-size/scripts/kallsyms.c
@@ -405,7 +405,7 @@ static void write_src(void)
 	}
 
 	output_label("kallsyms_num_syms");
-	printf("\tPTR\t%u\n", table_cnt);
+	printf("\t.long\t%u\n", table_cnt);
 	printf("\n");
 
 	/* table of offset markers, that give the offset in the compressed stream
@@ -434,7 +434,7 @@ static void write_src(void)
 
 	output_label("kallsyms_markers");
 	for (i = 0; i < ((table_cnt + 255) >> 8); i++)
-		printf("\tPTR\t%d\n", markers[i]);
+		printf("\t.long\t%u\n", markers[i]);
 	printf("\n");
 
 	free(markers);

  parent reply	other threads:[~2018-09-03 16:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-28 15:00 [PATCH] kallsyms: reduce size a little on 64-bit Jan Beulich
2018-09-02 17:12 ` Masahiro Yamada
2018-09-03 11:24   ` Jan Beulich
2018-09-03 12:09 ` Jan Beulich [this message]
2018-09-04  0:33   ` [PATCH v2] " Masahiro Yamada

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5B8D247E02000078001E48EC@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=michal.lkml@markovi.net \
    --cc=yamada.masahiro@socionext.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.