From: Russell King <rmk+lkml@arm.linux.org.uk>
To: David Brownell <david-b@pacbell.net>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>, rusty@rustcorp.com.au
Subject: Re: [patch 2.6.20-rc4-git] remove modpost false warnings on ARM
Date: Fri, 12 Jan 2007 16:38:52 +0000 [thread overview]
Message-ID: <20070112163852.GA16511@flint.arm.linux.org.uk> (raw)
In-Reply-To: <200701120831.37513.david-b@pacbell.net>
On Fri, Jan 12, 2007 at 08:31:36AM -0800, David Brownell wrote:
> Index: at91/scripts/mod/modpost.c
> ===================================================================
> --- at91.orig/scripts/mod/modpost.c 2007-01-11 22:51:49.000000000 -0800
> +++ at91/scripts/mod/modpost.c 2007-01-12 04:20:00.000000000 -0800
> @@ -679,6 +679,26 @@ static Elf_Sym *find_elf_symbol(struct e
> }
>
> /*
> + * If there's no name there, ignore it; likewise, ignore it if it's
> + * one of the magic symbols emitted used by current ARM tools.
> + *
> + * Otherwise if find_symbols_between() returns those symbols, they'll
> + * fail the whitelist tests and cause lots of false alarms ... fixable
> + * only by shrinking __exit and __init sections into __text, bloating
> + * the kernel (which is especially evil on embedded platforms).
> + */
> +static int is_valid_name(struct elf_info *elf, Elf_Sym *sym)
> +{
> + const char *name = elf->strtab + sym->st_name;
> +
> + if (!name || !strlen(name))
> + return 0;
> + if (strcmp(name, "$a") == 0 || strcmp(name, "$d") == 0)
> + return 0;
A more correct test would be that found in kallsyms.c:
/*
* 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] == '.');
}
Suggest that code is re-used here (as well as in other tools such as
oprofile, readprofile, etc.)
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of:
next prev parent reply other threads:[~2007-01-12 16:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-12 16:31 [patch 2.6.20-rc4-git] remove modpost false warnings on ARM David Brownell
2007-01-12 16:38 ` Russell King [this message]
2007-01-12 20:13 ` David Brownell
2007-02-16 3:10 ` [patch 2.6.20-git] " David Brownell
2007-02-16 3:28 ` Rusty Russell
2007-02-16 8:26 ` Sam Ravnborg
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=20070112163852.GA16511@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=david-b@pacbell.net \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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