From: Patrick McHardy <kaber@trash.net>
To: "David S. Miller" <davem@davemloft.net>
Cc: netfilter-devel@lists.netfilter.org
Subject: Re: [00/10]: Netfilter Update
Date: Thu, 23 Mar 2006 04:47:17 +0100 [thread overview]
Message-ID: <44221A45.7060003@trash.net> (raw)
In-Reply-To: <20060322.135906.60572272.davem@davemloft.net>
[-- Attachment #1: Type: text/plain, Size: 693 bytes --]
David S. Miller wrote:
>> [NETFILTER]: Fix undefined references to get_h225_addr
>
>
> I never in a million years would have thought that exporting
> a symbol to modules would work if the symbol was declared
> static :-) But come to think of it, I see nothing that prevents
> this.
>
> I wonder if this could be prevented somehow using so me construct
> in the module symbol export macros?
I was surprised too. Looking at the gcc-builtins, there seems to
be no way to determine if a function is static. But this small
hack appears to work. It adds a non-static forward declaration of
the exported function to the function body, causing a warning
if the function was declared static.
[-- Attachment #2: x --]
[-- Type: text/plain, Size: 475 bytes --]
diff --git a/include/linux/module.h b/include/linux/module.h
index 70bd843..f8eec37 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) \
+ typeof(sym) sym; \
__CRC_SYMBOL(sym, sec) \
static const char __kstrtab_##sym[] \
__attribute__((section("__ksymtab_strings"))) \
next prev parent reply other threads:[~2006-03-23 3:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-22 18:47 [00/10]: Netfilter Update Patrick McHardy
2006-03-22 18:47 ` [NETFILTER 01/10]: Fix ip6tables breakage from {get, set}sockopt compat layer Patrick McHardy
2006-03-22 18:47 ` [NETFILTER 02/10]: Fix Kconfig typos Patrick McHardy
2006-03-22 18:47 ` [NETFILTER 03/10]: ctnetlink: Fix expectaction mask dumping Patrick McHardy
2006-03-22 18:47 ` [NETFILTER 04/10]: nfnetlink_queue: fix nfnetlink message size Patrick McHardy
2006-03-22 18:47 ` [NETFILTER 05/10]: conntrack: cleanup the conntrack ID initialization Patrick McHardy
2006-03-22 18:47 ` [NETFILTER 06/10]: x_tables: set the protocol family in x_tables targets/matches Patrick McHardy
2006-03-22 18:47 ` [NETFILTER 07/10]: nf_conntrack: support for layer 3 protocol load on demand Patrick McHardy
2006-03-22 18:47 ` [NETFILTER 08/10]: Fix xt_policy address matching Patrick McHardy
2006-03-22 18:47 ` [NETFILTER 09/10]: futher {ip,ip6,arp}_tables unification Patrick McHardy
2006-03-22 18:47 ` [NETFILTER 10/10]: Fix undefined references to get_h225_addr Patrick McHardy
2006-03-22 21:59 ` [00/10]: Netfilter Update David S. Miller
2006-03-23 3:47 ` Patrick McHardy [this message]
2006-03-23 3:48 ` Patrick McHardy
2006-03-23 4:10 ` Patrick McHardy
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=44221A45.7060003@trash.net \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netfilter-devel@lists.netfilter.org \
/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.