From: Stephen Hemminger <shemminger@vyatta.com>
To: "Américo Wang" <xiyou.wangcong@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Michal Marek <mmarek@suse.cz>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] namespace.pl: fix source tree name mangling
Date: Wed, 29 Sep 2010 15:06:45 +0900 [thread overview]
Message-ID: <20100929150645.75b7e390@s6510> (raw)
In-Reply-To: <20100929060427.GD5169@cr0.nay.redhat.com>
On Wed, 29 Sep 2010 14:04:27 +0800
Américo Wang <xiyou.wangcong@gmail.com> wrote:
> On Wed, Sep 29, 2010 at 02:11:53PM +0900, Stephen Hemminger wrote:
> >On Wed, 29 Sep 2010 12:31:12 +0800
> >Américo Wang <xiyou.wangcong@gmail.com> wrote:
> >
> >> On Tue, Sep 28, 2010 at 05:44:02PM +0900, Stephen Hemminger wrote:
> >> >The current namespace.pl script does not find source files correctly.
> >> >The problem is that the current directory is not the base of the kernel
> >> >tree at the point where it calls objdump.
> >> >
> >> >Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> >> >
> >> >--- a/scripts/namespace.pl 2010-09-27 17:53:29.919433444 +0900
> >> >+++ b/scripts/namespace.pl 2010-09-28 09:24:36.891552993 +0900
> >> >@@ -167,8 +167,10 @@ sub do_nm
> >> > printf STDERR "$fullname is not an object file\n";
> >> > return;
> >> > }
> >> >- ($source = $fullname) =~ s/\.o$//;
> >> >- if (-e "$objtree$source.c" || -e "$objtree$source.S") {
> >> >+ $fullname =~ s/\.o$//;
> >> >+ $source = $basename;
> >> >+ $source =~ s/\.o$//;
> >>
> >> With your patch applied, $source will be the basename of
> >> an obj path with .o stripped.
> >>
> >> >+ if (-e "$objtree$fullname.c" || -e "$objtree$fullname.S") {
> >> > $source = "$objtree$source";
> >> > } else {
> >> > $source = "$srctree$source";
> >> >
> >>
> >> So here we will get a non-exist path stored in $source.
> >>
> >> Are you serious? What problem did you meet? I see no problem
> >> with the original code here.
> >
> >The original script is broken, if you run it on a compiled
> >kernel tree.
> >
> >No source file found for arch/x86/boot/a20.o
> >No source file found for arch/x86/boot/bioscall.o
> >No source file found for arch/x86/boot/cmdline.o
> >No source file found for arch/x86/boot/copy.o
> >No source file found for arch/x86/boot/cpucheck.o
> >No source file found for arch/x86/boot/early_serial_console.o
> >No source file found for arch/x86/boot/edd.o
> >No source file found for arch/x86/boot/main.o
> >No source file found for arch/x86/boot/mca.o
> >No source file found for arch/x86/boot/memory.o
> >No source file found for arch/x86/boot/pm.o
> >No source file found for arch/x86/boot/pmjump.o
> >No source file found for arch/x86/boot/printf.o
> >
> >...
> >
> >Running under perl debugger shows that the script has
> >done chdir prior to the failing test:
> >
>
> I see, the docs of Find module said it will do chdir. :)
> But I think your patch is still not right, how about the
> one below?
Please be more precise about "not right"? It makes the code
work.
Externally defined symbols with no external references
arch/x86/boot/copy
memcpy
arch/x86/boot/header
_start
bootsect_start
realmode_swtch
arch/x86/boot/pmjump
in_pm32
arch/x86/boot/string
atou
arch/x86/crypto/aes_glue
crypto_aes_decrypt_x86
crypto_aes_encrypt_x86
arch/x86/kernel/acpi/boot
mp_config_acpi_legacy_irqs
mp_override_legacy_irq
mp_register_gsi
arch/x86/kernel/acpi/realmode/copy
memcpy
arch/x86/kernel/acpi/realmode/wakeup
_start
arch/x86/kernel/acpi/wakeup_32
saved_eip
arch/x86/kernel/apic/apic
apic_disable
enable_IR
max_physical_apicid
setup_APIC_eilvt_mce
...
next prev parent reply other threads:[~2010-09-29 6:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-28 8:44 [PATCH 0/2] namespace.pl fixes Stephen Hemminger
2010-09-28 8:44 ` [PATCH 1/2] namespace.pl: fix source tree name mangling Stephen Hemminger
2010-09-29 4:31 ` Américo Wang
2010-09-29 5:11 ` Stephen Hemminger
2010-09-29 6:04 ` Américo Wang
2010-09-29 6:06 ` Stephen Hemminger [this message]
2010-09-29 7:06 ` Américo Wang
2010-09-29 7:14 ` Stephen Hemminger
2010-09-29 9:34 ` Américo Wang
2010-09-29 13:04 ` Stephen Hemminger
2010-09-28 8:44 ` [PATCH 2/2] namespace.pl : update file exclusion list Stephen Hemminger
2010-09-29 4:43 ` Américo Wang
2010-09-29 5:03 ` Stephen Hemminger
2010-10-03 3:29 ` Ævar Arnfjörð Bjarmason
2010-10-05 1:13 ` Stephen Hemminger
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=20100929150645.75b7e390@s6510 \
--to=shemminger@vyatta.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmarek@suse.cz \
--cc=xiyou.wangcong@gmail.com \
/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.