From: Arnd Bergmann <arnd@arndb.de>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com.br>
Cc: kernel-janitors@lists.osdl.org, <linux-kernel@vger.kernel.org>
Subject: Re: finding unused globals in the kernel
Date: Mon, 1 Mar 2004 20:28:33 +0100 [thread overview]
Message-ID: <200403012028.34612.arnd@arndb.de> (raw)
In-Reply-To: <Pine.LNX.4.44.0402282059580.2546-100000@dmt.cyclades>
On Monday 01 March 2004 15:32, Marcelo Tosatti wrote:
>
> On Sat, 28 Feb 2004, Arnd Bergmann wrote:
> > bash /home/arnd/linux-2.6-ipc/scripts/checkunused.sh i386 arch/i386/kernel/head.o arch/i386/kernel/init_task.o init/built-in.o usr/built-in.o arch/i386/kernel/built-in.o arch/i386/mm/built-in.o arch/i386/mach-default/built-in.o kernel/built-in.o mm/built-in.o fs/built-in.o ipc/built-in.o security/built-in.o crypto/built-in.o lib/lib.a arch/i386/lib/lib.a lib/built-in.o arch/i386/lib/built-in.o drivers/built-in.o sound/built-in.o arch/i386/pci/built-in.o arch/i386/oprofile/built-in.o arch/i386/power/built-in.o net/built-in.o
> > unreferenced definition VSYSCALL_BASE
>
> It seems your script is behaving wrongly for the VSYSCALL_BASE case
> (probably others too):
>
> elf.h:
>
> #define VSYSCALL_BASE (__fix_to_virt(FIX_VSYSCALL))
> #define VSYSCALL_EHDR ((const struct elfhdr *) VSYSCALL_BASE)
> #define VSYSCALL_ENTRY ((unsigned long) &__kernel_vsyscall)
> extern void __kernel_vsyscall;
Actually, VSYSCALL_BASE is defined as an absolute symbol in
arch/i386/kernel/vsyscall.lds, so it's not as broken as one might think.
The bug is that the script cannot find symbols defined by the linker
and used only as a constant in the same linker script. Fortunately, this
isn't done in many places.
Arnd <><
prev parent reply other threads:[~2004-03-01 19:35 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-28 21:13 finding unused globals in the kernel Arnd Bergmann
2004-03-01 6:11 ` Keith Owens
2004-03-01 6:22 ` Keith Owens
2004-03-01 9:42 ` Arnd Bergmann
2004-03-01 12:37 ` Keith Owens
2004-03-01 15:34 ` [Kernel-janitors] " Arnd Bergmann
2004-03-01 14:32 ` Marcelo Tosatti
2004-03-01 19:28 ` Arnd Bergmann [this message]
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=200403012028.34612.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=kernel-janitors@lists.osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com.br \
/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