From: Mike Frysinger <vapier.adi@gmail.com>
To: Alessio Igor Bogani <abogani@kernel.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
Tim Abbott <tabbott@ksplice.com>,
Anders Kaseorg <andersk@ksplice.com>,
Jason Wessel <jason.wessel@windriver.com>,
Tim Bird <tim.bird@am.sony.com>,
LKML <linux-kernel@vger.kernel.org>,
Linux Embedded <linux-embedded@vger.kernel.org>
Subject: Re: [PATCH 0/4] Speed up the symbols' resolution process V4
Date: Wed, 11 May 2011 11:52:56 -0400 [thread overview]
Message-ID: <BANLkTikFSN-DkkPNPtv1VigCg08YoB_q2g@mail.gmail.com> (raw)
In-Reply-To: <BANLkTi=OXuR4iJFqUEa4pA=yO0aXaqEzyA@mail.gmail.com>
On Wed, May 11, 2011 at 11:25, Alessio Igor Bogani wrote:
> 2011/5/11 Mike Frysinger:
>>> Sorry I don't think that is a good choice from a long term point of
>>> view. What do you think to add MODULE_SYMBOL_PREFIX to section names
>>> instead? In this way symbol and section names should always be
>>> different also on symbol prefixed archs (which are blackfin and
>>> h8300).
>>
>> that doesnt work. it simply delays the problem to another set of
>> underscores. so with that change, local_bh_enable/_local_bh_enable
>> work, but now send_remote_softirq/__send_remote_softirq fail:
>
> In my opinion it should work. if I use SYMBOL_PREFIX + two underscore
> for section name I should always obtain different names.
> So if SYMBOL_PREFIX is "_" section name will be "___", if
> SYMBOL_PREFIX is "__" section name will be "____" and so on.
i dont follow your logic. SYMBOL_PREFIX is simply an underscore for
Blackfin, so you are not guaranteed unique names when you're only
prefixing more underscores. the issue isnt with a symbol colliding
with itself, the issue is with a symbol colliding with another symbol
that has underscores added to its name.
if you export _foo/foo, you'll get an error with the current code:
/* EXPORT_SYMBOL(foo); */
.section ___ksymtab__foo,"a",@progbits
___ksymtab_foo:
/* EXPORT_SYMBOL(_foo); */
.section ___ksymtab___foo,"a",@progbits
___ksymtab__foo:
you can see how the first section and the last symbol collide
by putting the symbol prefix along the lines of the separator, you
delay it to __foo/foo:
/* EXPORT_SYMBOL(foo); */
.section ___ksymtab___foo,"a",@progbits
___ksymtab_foo:
/* EXPORT_SYMBOL(__foo); */
.section ___ksymtab_____foo,"a",@progbits
___ksymtab___foo:
the Blackfin toolchain puts the prefix before the ksymtab part while
you're putting it after, so there is always a possibility of collision
unless you pick a split char that doesnt include an underscore.
>> CC kernel/softirq.o
>> nano /tmp/cconhYy1.s: Assembler messages:
>> /tmp/cconhYy1.s:3664: Error: symbol `___ksymtab___send_remote_softirq'
>> is already defined
>> make[1]: *** [kernel/softirq.o] Error 1
>
> I'm a bit confused. I can build a kernel here:
> $ make ARCH=blackfin CROSS_COMPILE="bfin-uclinux-" defconfig
it's failing for me with current linux-next and the patch you posted
previously. also, you dont need to set CROSS_COMPILE as that is the
default value for ARCH=blackfin ...
> Unfortunately I can't make skyeye emulator works to test the obtained
> kernel image.
skyeye is crap. the latest upstream gdb/sim code can boot a kernel,
but if you aren't up-to-date with that, this binary i've been using
locally should work too:
http://blackfin.uclinux.org/uimages/bfin-elf-run
$ bfin-elf-run --env operating --model bf537 --sirev 2 ./vmlinux
earlyprintk=serial,uart0 console=ttyBF0
Linux version 2.6.39-rc7-ADI-2011R1-pre-00132-g9d91c9a
(vapier@vapier-m) (gcc version 4.3.5 (ADI-trunk/git-ce854ee) ) #16 Wed
May 11 11:55:28 EDT 2011
register early platform devices
bootconsole [early_shadow0] enabled
bootconsole [early_BFuart0] enabled
early printk enabled on early_BFuart0
Limiting kernel memory to 56MB due to anomaly 05000263
Board Memory: 64MB
Kernel Managed Memory: 64MB
Memory map:
fixedcode = 0x00000400-0x00000490
text = 0x00001000-0x000f7f30
rodata = 0x000f7f30-0x001456ac
.............
-mike
next prev parent reply other threads:[~2011-05-11 15:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-16 13:26 [PATCH 0/4] Speed up the symbols' resolution process V4 Alessio Igor Bogani
2011-04-16 13:26 ` [PATCH 1/4] module: Restructure each_symbol() code Alessio Igor Bogani
2011-04-19 1:31 ` Rusty Russell
2011-04-16 13:26 ` [PATCH 2/4] module: Sort exported symbols Alessio Igor Bogani
2011-04-16 13:26 ` [PATCH 3/4] lib: Add generic binary search function to the kernel Alessio Igor Bogani
2011-04-16 13:26 ` [PATCH 4/4] module: Use the binary search for symbols resolution Alessio Igor Bogani
2011-04-16 14:08 ` Wanlong Gao
2011-04-16 14:32 ` Wanlong Gao
2011-04-19 1:37 ` Rusty Russell
2011-04-19 1:44 ` Wanlong Gao
2011-04-19 11:35 ` Rusty Russell
2011-04-19 12:46 ` Wanlong Gao
2011-04-27 15:31 ` [PATCH 0/4] Speed up the symbols' resolution process V4 Dirk Behme
2011-05-11 3:32 ` Mike Frysinger
2011-05-11 7:04 ` Alessio Igor Bogani
2011-05-11 9:19 ` Alessio Igor Bogani
2011-05-11 13:44 ` Alessio Igor Bogani
2011-05-11 14:47 ` Mike Frysinger
2011-05-11 15:25 ` Alessio Igor Bogani
2011-05-11 15:52 ` Mike Frysinger [this message]
2011-05-12 9:10 ` Alessio Igor Bogani
2011-05-12 14:30 ` Mike Frysinger
2011-05-13 7:01 ` Alessio Igor Bogani
2011-05-14 17:32 ` Mike Frysinger
2011-05-15 8:28 ` Alessio Igor Bogani
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=BANLkTikFSN-DkkPNPtv1VigCg08YoB_q2g@mail.gmail.com \
--to=vapier.adi@gmail.com \
--cc=abogani@kernel.org \
--cc=andersk@ksplice.com \
--cc=jason.wessel@windriver.com \
--cc=linux-embedded@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=tabbott@ksplice.com \
--cc=tim.bird@am.sony.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).