From: "David S. Miller" <davem@redhat.com>
To: Russell King <rmk@arm.linux.org.uk>
Cc: linux-kernel@vger.kernel.org
Subject: Re: IPv4 NAT doesn't compile in 2.4.4
Date: Sat, 28 Apr 2001 14:07:53 -0700 (PDT) [thread overview]
Message-ID: <15083.12585.159124.505983@pizda.ninka.net> (raw)
In-Reply-To: <20010428172554.H21792@flint.arm.linux.org.uk>
In-Reply-To: <20010428172554.H21792@flint.arm.linux.org.uk>
Russell King writes:
> ip_nat_standalone.c:
>
> static int init_or_cleanup(int init)
> {
> ...
> cleanup_nat:
> ip_nat_cleanup();
> ...
> }
Call ip_nat_cleanup();
> ip_nat_core:
>
> void __exit ip_nat_cleanup(void)
> {
> ip_ct_selective_cleanup(&clean_nat, NULL);
> ip_conntrack_destroyed = NULL;
> }
Define ip_nat_cleanup() as an __exit function.
> *Don't* do this - its fundamentally wrong. Code in the kernel should _not_
> reference code that has been removed by the linker.
Why would ip_nat_cleanup() be removed by the linker? All the "unused"
attribute should do is shut up gcc if the thing is marked static yet
not called. The GCC manual even states "... means that the function
is meant to be possibly unused. GNU CC will not produce a warning
for this function." It makes no mention of any effect on the actual
code output, or that the linker will delete it.
It doesn't remove the function on any platform I could test this on.
If the linker removed it, why did it give a relocation truncation
error instead of a missing symbol error? And more importantly, what
specifically was the reason that the linker removed the function on
ARM, what made this happen?
Please explain this in detail so we don't have to guess as I have
seen no other report of this.
Later,
David S. Miller
davem@redhat.com
next prev parent reply other threads:[~2001-04-28 21:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-28 16:25 Russell King
2001-04-28 21:07 ` David S. Miller [this message]
2001-04-28 21:21 ` Russell King
2001-04-28 21:24 ` David S. Miller
2001-05-02 4:57 ` Rusty Russell
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=15083.12585.159124.505983@pizda.ninka.net \
--to=davem@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rmk@arm.linux.org.uk \
/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
all inboxes | Powered by JetHome®