diff mbox

[4/6] kbuild: Support padding in kallsyms tables

Message ID 20140208174645.GH12219@tassilo.jf.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andi Kleen Feb. 8, 2014, 5:46 p.m. UTC
> 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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Markus Trippelsdorf Feb. 8, 2014, 6:01 p.m. UTC | #1
On 2014.02.08 at 09:46 -0800, Andi Kleen wrote:
> > 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.

Yes. The build completes successfully now.
Thanks.
diff mbox

Patch

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)