From: Keith Owens <kaos@ocs.com.au>
To: linux-ia64@vger.kernel.org
Subject: Re: [Linux-ia64] Re: loading a kernel module
Date: Wed, 16 Oct 2002 07:04:03 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590709805171@msgid-missing> (raw)
In-Reply-To: <marc-linux-ia64-105590709805162@msgid-missing>
On Wed, 16 Oct 2002 07:52:15 +0200,
Christian Hildner <christian.hildner@hob.de> wrote:
>the source isn't that complex as you might have seen in the length of the objdump output.
>The object I have given you is only a small test program to find out the missing linkage for
>brl branches. My original program needs brl to branch across virtual pages with a big
>difference in the virtual addresses. So the test prog never makes any sence, but shows the
>missing R_IA64_PCREL60B nicely.
>
>Christian
>
>PS: Here is the source without any guarantee not to crash ...
>
>#define MODULE
>#include <linux/module.h>
>
>int dummy(void)
>{
> return 0;
>}
>
>int init_module(void)
>{
> printk("Init Module starting. About to crash...\n");
> asm volatile ("brl dummy ");
> return 0;
>}
>
>void cleanup_module(void)
>{
> printk("Done\n");
>}
OK, so it is not a toolchain problem, this is user code. Unfortunately
it is introducing a special case into modutils.
All existing PCREL relocations in modutils go via a PLT, saving and
switching GP as they do so. I am assuming that branching via the PLT
is no good for you, you really do want a direct branch over the 64 bit
address space, without any change to GP. That is, the source and
target addresses use the same global data area, or one of them does not
use any global data area at all. Please confirm this before I make any
changes.
If you need different GP values in the source and target addresses then
a normal PCREL21 via PLT will do the job.
next prev parent reply other threads:[~2002-10-16 7:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-15 12:34 [Linux-ia64] Re: loading a kernel module Keith Owens
2002-10-15 18:57 ` Jim Wilson
2002-10-16 1:16 ` Keith Owens
2002-10-16 5:52 ` Christian Hildner
2002-10-16 7:04 ` Keith Owens [this message]
2002-10-16 7:56 ` Christian Hildner
2002-10-16 9:06 ` Christian Hildner
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-105590709805171@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