public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: mmarek@suse.cz, linux-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org
Subject: Re: [PATCH 4/6] kbuild: Support padding in kallsyms tables
Date: Sat, 8 Feb 2014 09:46:45 -0800	[thread overview]
Message-ID: <20140208174645.GH12219@tassilo.jf.intel.com> (raw)
In-Reply-To: <20140208121241.GA401@x4>

> With attached config I get:
> 
>   KSYM    .tmp_kallsyms2.o
> kallsyms: address pointers padding too short: 24495 missing
>   OBJCOPY .tmp_kallsyms2.bin
>   PATCHFILE vmlinux
> Not enough padding in vmlinux for new kallsyms, missing 192120
> Makefile:840: recipe for target 'vmlinux' failed

Nice test case thanks.  This should fix it.

diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index e479076..fb6898f 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -197,15 +197,19 @@ static int symbol_valid_tr(struct sym_entry *s)
 {
 	size_t i;
 	struct text_range *tr;
+	int valid = 0;
 
 	for (i = 0; i < ARRAY_SIZE(text_ranges); ++i) {
 		tr = &text_ranges[i];
 
+		if (tr->start && tr->end)
+		    valid++;
+
 		if (s->addr >= tr->start && s->addr <= tr->end)
 			return 1;
 	}
 
-	return 0;
+	return valid ? 0 : 1;
 }
 
 static int symbol_valid(struct sym_entry *s)

  reply	other threads:[~2014-02-08 17:46 UTC|newest]

Thread overview: 12+ 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 [this message]
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 ` [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=20140208174645.GH12219@tassilo.jf.intel.com \
    --to=ak@linux.intel.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus@trippelsdorf.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox