From: Tim Gardner <tim.gardner@canonical.com>
To: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: linux-wireless@vger.kernel.org, Greg KH <greg@kroah.com>,
Johannes Berg <johannes@sipsolutions.net>
Subject: Re: [RFC] compat-2.6: mangle symbols for driver-select
Date: Sat, 19 Sep 2009 21:46:47 -0600 [thread overview]
Message-ID: <4AB5A5A7.3020107@canonical.com> (raw)
In-Reply-To: <20090919205545.GA18080@bombadil.infradead.org>
[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]
Luis R. Rodriguez wrote:
> Today at the summit we spoke about mangling symbols for driver-slect.
> Here's a quick nasty take on this but without doing this for driver-select
> specifically just for testing. It seems to compile, but someone more motivated
> may want to test and make this apply somehow only for driver-select or perhaps
> when a -D define is used.
>
> Reason for this is to help distributions / OEMs / ODMs who want to replace
> just *one* driver with compat-wireless.
>
I think it would be better to generate the list of mangled symbols
dynamically. In older Ubuntu releases (before depmod behavior was
corrected), we have to run a 'munge' script to preface all of the
exported symbols so that a compat-wireless driver references the
compat-wireless protocol stack symbols. See the attached munge script
for compat-wireless on 2.6.24. We can either do something like this for
compat-wireless, or we could use a subset of this logic to generate the
list of symbols contained within the '#ifdef
CONFIG_COMPAT_WIRELESS_MANGLE' clause.
rtg
--
Tim Gardner tim.gardner@canonical.com
[-- Attachment #2: munge --]
[-- Type: text/plain, Size: 885 bytes --]
#!/bin/bash
#
# Isolate the compat-wireless exported symbols and munge every occurence such that
# there is no possibility of conflict with the main kernel.
#
TL=token_list
FL=file_list
SL=sed_list
TL_EXCEPTIONS=token_list_exceptions
find compat-wireless-2.6 -name "*.[ch]" > ${FL}
rm -f ${TL_EXCEPTIONS}
for i in wireless_send_event iw_handler_set_spy wireless_spy_update iw_handler_get_thrspy iw_handler_get_spy iw_handler_set_thrspy
do
echo ${i} >> ${TL_EXCEPTIONS}
done
cat ${FL} | \
egrep -v "compat\.[ch]" |\
xargs grep -h EXPORT_SYMBOL | \
grep -v -f ${TL_EXCEPTIONS} |\
sed -e 's/^.*EXPORT_SYMBOL_GPL(//' -e 's/);//' -e 's/^.*EXPORT_SYMBOL(//' -e 's/);//' |\
sort -r | uniq > ${TL}
rm -f ${SL}
cat ${TL} | while read token
do
echo s/${token}/cw_${token}/g >> ${SL}
done
cat ${FL} | while read f
do
sed -i -f ${SL} "${f}"
done
rm -f ${TL} ${FL} ${SL} ${TL_EXCEPTIONS}
next prev parent reply other threads:[~2009-09-20 3:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-19 20:55 [RFC] compat-2.6: mangle symbols for driver-select Luis R. Rodriguez
2009-09-20 3:46 ` Tim Gardner [this message]
2009-09-20 14:43 ` Luis R. Rodriguez
2009-09-20 16:49 ` Tim Gardner
2009-09-20 17:28 ` Luis R. Rodriguez
2009-09-29 0:02 ` Andrey Yurovsky
2009-09-29 0:33 ` Luis R. Rodriguez
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=4AB5A5A7.3020107@canonical.com \
--to=tim.gardner@canonical.com \
--cc=greg@kroah.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=lrodriguez@atheros.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.