From: Keith Owens <kaos@ocs.com.au>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] Problem with call across kernel modules
Date: Sat, 25 Jan 2003 01:32:36 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590709805750@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590709805718@msgid-missing>
On Fri, 24 Jan 2003 20:06:35 -0500,
"MONTGOMERY,BOB (HP-FtCollins,ex1)" <bob.montgomery@hp.com> wrote:
>So it looks like the question has become: Why does the default exported
>symbol from an insmod'd module not correctly point to a function
>descriptor as required on IA64? Or, if it isn't right, why make
>it visible?
I had not realised that you were relying on the "export everything by
default" behaviour. That does not work for ia64 and I don't see any
way of making it work. As you say, the global symbol for a function
must point to the function descriptor, not the address. When you
EXPORT_SYMBOL(function_name),
__attribute__((section("__ksymtab"))) = \
{ (unsigned long)&sym, __kstrtab_##sym }
uses &function_name so gcc generates the function descriptor in the
modules export table. However if you rely on default exporting, gcc
has not been told that the function will be exported so there is no
function descriptor to use. That means there is nothing for insmod to
point to, except the function address.
Bottom line - do not rely on default export behaviour for ia64.
Nobody should rely on this feature anyway, the default export is
compatibility code that dates back to 2.0 kernels, current code should
explicitly export what it needs. In 2.5 kernels that is exactly what
happens, default exporting is off.
modutils 2.4.23 will issue a big warning for all architectures that
have function descriptors when you load a module that relies on default
export behaviour. "Functions must be explicitly exported on this
architecture, attempts to use functions in module <foo> will probably
kill your system".
prev parent reply other threads:[~2003-01-25 1:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-17 23:28 [Linux-ia64] Problem with call across kernel modules MONTGOMERY,BOB (HP-FtCollins,ex1)
2003-01-25 1:06 ` MONTGOMERY,BOB (HP-FtCollins,ex1)
2003-01-25 1:32 ` Keith Owens [this message]
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=marc-linux-ia64-105590709805750@msgid-missing \
--to=kaos@ocs.com.au \
--cc=linux-ia64@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox