From: Arnd Bergmann <arnd@arndb.de>
To: Michal Marek <mmarek@suse.cz>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Andrew Morton <akpm@linux-foundation.org>,
linux-kbuild@vger.kernel.org
Subject: scripts/kallsyms: Avoid ARM veneer symbols
Date: Mon, 24 Jun 2013 16:01:43 +0200 [thread overview]
Message-ID: <2983817.Xe2505Drlj@wuerfel> (raw)
When building ARM kernels that exceed a certain size, the linker
will add "veneers" that allow long branches. Unfortunately,
using a longer kallsyms section may lead to the extra veneers
being needed, which leads to inconsistent kallsyms data with the
message
Inconsistent kallsyms data
Try make KALLSYMS_EXTRA_PASS=1 as a workaround
In some case, not just one but up to three extra passes were
needed before getting to a state that needed no extra veneers.
The easiest solution is to skip veneers in kallsyms in the
same way we already skip a couple of other symbols.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 487ac6f..53ec0bb 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -69,14 +69,32 @@ static void usage(void)
exit(1);
}
-/*
- * This ignores the intensely annoying "mapping symbols" found
- * in ARM ELF files: $a, $t and $d.
- */
static inline int is_arm_mapping_symbol(const char *str)
{
- return str[0] == '$' && strchr("atd", str[1])
- && (str[2] == '\0' || str[2] == '.');
+ size_t len;
+
+ /*
+ * This ignores the intensely annoying "mapping symbols" found
+ * in ARM ELF files: $a, $t and $d.
+ */
+ if (str[0] == '$' && strchr("atd", str[1])
+ && (str[2] == '\0' || str[2] == '.'))
+ return 1;
+
+ len = strlen(str);
+ if (len < 10)
+ return 0;
+
+ /*
+ * This ignores any __.*_veneer symbol, which get
+ * inserted for large kernels, in order to avoid
+ * inconsistent data.
+ */
+ if (str[0] == '_' && str[1] == '_' &&
+ strcmp(str + len - 7, "_veneer") == 0)
+ return 1;
+
+ return 0;
}
static int read_symbol_tr(const char *sym, unsigned long long addr)
next reply other threads:[~2013-06-24 14:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 14:01 Arnd Bergmann [this message]
2013-06-25 15:09 ` scripts/kallsyms: Avoid ARM veneer symbols Dave Martin
2013-07-03 16:03 ` Arnd Bergmann
2013-07-05 14:51 ` Dave P Martin
2013-07-05 16:42 ` Arnd Bergmann
2013-07-05 17:26 ` Dave P Martin
2013-07-05 23:34 ` Arnd Bergmann
2013-07-08 9:59 ` Dave P Martin
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=2983817.Xe2505Drlj@wuerfel \
--to=arnd@arndb.de \
--cc=akpm@linux-foundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox