All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: mmarek@suse.cz
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
	Andi Kleen <ak@linux.intel.com>
Subject: [PATCH 6/6] kbuild: Remove .dot postfixes in kallsyms
Date: Sat,  8 Feb 2014 08:50:40 +0100	[thread overview]
Message-ID: <1391845840-28514-6-git-send-email-ak@linux.intel.com> (raw)
In-Reply-To: <1391845840-28514-1-git-send-email-ak@linux.intel.com>

For static and some LTO symbols gcc generates .XXXX postfixes.
Remove those from the kallsyms, as they are not useful to the user
and makes it much larger. This also avoids some issues with LTO.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
 scripts/kallsyms.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index c874304..d0e2b56 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -122,7 +122,7 @@ static int read_symbol_tr(const char *sym, unsigned long long addr)
 static int read_symbol(FILE *in, struct sym_entry *s)
 {
 	char str[500];
-	char *sym, stype;
+	char *sym, stype, *dot;
 	int rc;
 
 	rc = fscanf(in, "%llx %c %499s\n", &s->addr, &stype, str);
@@ -138,6 +138,11 @@ static int read_symbol(FILE *in, struct sym_entry *s)
 		return -1;
 	}
 
+	/* Drop static .XXXX postfixes */
+	dot = strchr(str, '.');
+	if (dot)
+		*dot = 0;
+
 	sym = str;
 	/* skip prefix char */
 	if (symbol_prefix_char && str[0] == symbol_prefix_char)
-- 
1.8.5.2


  parent reply	other threads:[~2014-02-08  7:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-08  7:50 [PATCH 1/6] kbuild: Remove relocations from kallsyms table Andi Kleen
2014-02-08  7:50 ` [PATCH 2/6] kbuild: Put kallsyms into own section Andi Kleen
2014-02-08  7:50 ` [PATCH 3/6] kbuild: Don't include const variable in kallsyms with !KALLSYMS_ALL Andi Kleen
2014-02-08  7:50 ` [PATCH 4/6] kbuild: Support padding in kallsyms tables Andi Kleen
2014-02-08 12:12   ` Markus Trippelsdorf
2014-02-08 17:46     ` Andi Kleen
2014-02-08 18:01       ` Markus Trippelsdorf
2014-02-08  7:50 ` [PATCH 5/6] kbuild: Use single pass kallsyms Andi Kleen
2014-02-08  9:19   ` Markus Trippelsdorf
2014-02-08 16:01     ` Andi Kleen
2014-02-08 18:00       ` Markus Trippelsdorf
2014-02-08  7:50 ` Andi Kleen [this message]
2014-02-14 21:17 Updated single-pass kallsyms patchkit for LTO Andi Kleen
2014-02-14 21:17 ` [PATCH 6/6] kbuild: Remove .dot postfixes in kallsyms Andi Kleen
2014-02-18 14:24 Single pass kallsyms v3 Andi Kleen
2014-02-18 14:24 ` [PATCH 6/6] kbuild: Remove .dot postfixes in kallsyms Andi Kleen

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=1391845840-28514-6-git-send-email-ak@linux.intel.com \
    --to=ak@linux.intel.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    /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.