Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754919AbYHGXg2 (ORCPT ); Thu, 7 Aug 2008 19:36:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752336AbYHGXgU (ORCPT ); Thu, 7 Aug 2008 19:36:20 -0400 Received: from cdptpa-omtalb.mail.rr.com ([75.180.132.121]:34492 "EHLO cdptpa-omtalb.mail.rr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751053AbYHGXgT (ORCPT ); Thu, 7 Aug 2008 19:36:19 -0400 Date: Thu, 07 Aug 2008 19:36:18 -0400 Message-ID: <87zlnotn2l.wl%ysato@users.sourceforge.jp> From: Yoshinori Sato To: Andrew Morton , Paulo Marques Cc: lkml Subject: [PATCH] exclude h8300 local symbols (Re: kallsyms exclude local symbols) In-Reply-To: <489AE3C5.2000807@grupopie.com> References: <87fxphzan5.wl%ysato@users.sourceforge.jp> <489AE3C5.2000807@grupopie.com> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL/10.7 Emacs/22.2 (x86_64-pc-linux-gnu) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2895 Lines: 89 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 --- 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); } -- 1.5.6.3 -- Yoshinori Sato -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/