From: Andrew Morton <akpm@linux-foundation.org>
To: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Paulo Marques <pmarques@grupopie.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] exclude h8300 local symbols (Re: kallsyms exclude local symbols)
Date: Sun, 7 Sep 2008 23:56:27 -0700 [thread overview]
Message-ID: <20080907235627.293b0a4b.akpm@linux-foundation.org> (raw)
In-Reply-To: <87zlnotn2l.wl%ysato@users.sourceforge.jp>
On Thu, 07 Aug 2008 19:36:18 -0400 Yoshinori Sato <ysato@users.sourceforge.jp> wrote:
> At Thu, 07 Aug 2008 13:00:05 +0100,
> Paulo Marques wrote:
> >
> > Yoshinori Sato wrote:
> > > h8300's nm output include '.Lfoo' local symbols.
> > > [...]
> > > /* exclude also MIPS ELF local symbols ($L123 instead of .L123) */
> > > - else if (str[0] == '$')
> > > + else if (str[0] == '$' || str[0] == '.')
> >
> > The comment above needs some updating too. Something along these lines:
> >
> > /* exclude also MIPS ELF local symbols (eg. $L123) and h8300 (eg .LM10) */
> >
> > Other than that, the patch seems fine.
> >
> > --
> > Paulo Marques - www.grupopie.com
> >
> > "...so she told me it was either her or the ham radio, over."
>
> Thanks reply.
>
> Update comment.
> And same problem in modpost.
>
> Warning message dirty.
> WARNING: vmlinux.o(.text+0x304b): Section mismatch in reference from the variable .LM10 to the variable .init.text:_free_area_init
> The function .LM10() references
> the variable __init _free_area_init.
> This is often because .LM10 lacks a __init
> annotation or the annotation of _free_area_init is wrong.
>
> fix it.
> WARNING: vmlinux.o(.text+0x304b): Section mismatch in reference from the variable _paging_init to the variable .init.text:___alloc_bootmem
> The function _paging_init() references
> the variable __init ___alloc_bootmem.
> This is often because _paging_init lacks a __init
> annotation or the annotation of ___alloc_bootmem is wrong.
>
> Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
>
> ---
> scripts/kallsyms.c | 5 +++--
> scripts/mod/modpost.c | 4 +++-
> 2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
> index ad2434b..64ad9cf 100644
> --- a/scripts/kallsyms.c
> +++ b/scripts/kallsyms.c
> @@ -105,8 +105,9 @@ static int read_symbol(FILE *in, struct sym_entry *s)
> else if (toupper(stype) == 'U' ||
> is_arm_mapping_symbol(sym))
> return -1;
> - /* exclude also MIPS ELF local symbols ($L123 instead of .L123) */
> - else if (str[0] == '$')
> + /* exclude also MIPS ELF (e.g. $L123) and h8300 elf (e.g. .LM123)
> + local symbols */
> + else if (str[0] == '$' || str[0] == '.')
> return -1;
> /* exclude debugging symbols */
> else if (stype == 'N')
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index 418cd7d..e07f4ba 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -1042,7 +1042,9 @@ static inline int is_valid_name(struct elf_info *elf, Elf_Sym *sym)
> {
> const char *name = elf->strtab + sym->st_name;
>
> - if (!name || !strlen(name))
> + if (!name || !strlen(name) ||
> + /* exclude h8300 elf local symbols (e.g. .LM123) */
> + name[0] == '.')
> return 0;
> return !is_arm_mapping_symbol(name);
> }
This patch broke kallsyms on powerpc. Please see
http://ozlabs.org/pipermail/linuxppc-dev/2008-September/062549.html
next prev parent reply other threads:[~2008-09-08 6:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-07 4:55 [PATCH] kallsyms exclude local symbols Yoshinori Sato
2008-08-07 12:00 ` Paulo Marques
2008-08-07 23:36 ` [PATCH] exclude h8300 local symbols (Re: kallsyms exclude local symbols) Yoshinori Sato
2008-09-08 6:56 ` Andrew Morton [this message]
2008-09-08 19:20 ` Paulo Marques
2008-09-08 20:58 ` Yoshinori Sato
2008-09-08 23:39 ` Hugh Dickins
2008-09-09 3:07 ` Yoshinori Sato
2008-09-12 19:28 ` Yoshinori Sato
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=20080907235627.293b0a4b.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pmarques@grupopie.com \
--cc=ysato@users.sourceforge.jp \
/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.