From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, netfilter-devel@lists.netfilter.org,
zhaojignmin@hotmail.com, linux-kernel@vger.kernel.org,
bunk@stusta.de
Subject: Re: [2.6 patch] ip_conntrack_helper_h323.c: EXPORT_SYMBOL'ed functions shouldn't be static
Date: Fri, 24 Mar 2006 02:27:44 +0100 [thread overview]
Message-ID: <44234B10.5040802@trash.net> (raw)
In-Reply-To: <20060323.161314.59991770.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 668 bytes --]
David S. Miller wrote:
> From: Adrian Bunk <bunk@stusta.de>
> Date: Fri, 24 Mar 2006 01:08:01 +0100
>
>
>>EXPORT_SYMBOL'ed functions shouldn't be static.
>>
>>Signed-off-by: Adrian Bunk <bunk@stusta.de>
>
>
> Fixed in Linus's tree as of yesterday.
>
> I actually have a patch from Patrick McHardy that will make
> this kind of error a build time failure instead of silently
> working in the modular case. I just need to test it out
> a bit before pushing.
I guess I should send it to lkml anyway. It boots fine, I couldn't
figure out how to compare checksums, since the time of compilation
and a couple other dynamically generated strings end up in the binary.
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 1070 bytes --]
[MODULES]: Don't allow statically declared exports
Add an extern declaration for exported symbols to make the compiler warn
on symbols declared statically.
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 8648236083e488ff4fc279b66d63b1187e22e558
tree cba9ee372f1056c8cf63cdc6a37a6a761fa490c9
parent 8b21e6d05d6ac0aeb44f5866ab611e2709c2f08e
author Patrick McHardy <kaber@trash.net> Thu, 23 Mar 2006 05:07:39 +0100
committer Patrick McHardy <kaber@trash.net> Thu, 23 Mar 2006 05:07:39 +0100
include/linux/module.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/linux/module.h b/include/linux/module.h
index 70bd843..d956915 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -183,6 +183,7 @@ void *__symbol_get_gpl(const char *symbo
/* For every exported symbol, place a struct in the __ksymtab section */
#define __EXPORT_SYMBOL(sym, sec) \
+ extern typeof(sym) sym; \
__CRC_SYMBOL(sym, sec) \
static const char __kstrtab_##sym[] \
__attribute__((section("__ksymtab_strings"))) \
next prev parent reply other threads:[~2006-03-24 1:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-24 0:08 [2.6 patch] ip_conntrack_helper_h323.c: EXPORT_SYMBOL'ed functions shouldn't be static Adrian Bunk
2006-03-24 0:13 ` David S. Miller
2006-03-24 0:29 ` Adrian Bunk
2006-03-24 1:27 ` Patrick McHardy [this message]
2006-03-24 6:08 ` David S. Miller
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=44234B10.5040802@trash.net \
--to=kaber@trash.net \
--cc=bunk@stusta.de \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@lists.netfilter.org \
--cc=zhaojignmin@hotmail.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).