public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
* [Linux-ia64] still patching syscall into module
@ 2001-07-31 10:57 chas williams
  2001-08-01 11:43 ` chas williams
  2001-08-01 20:59 ` chas williams
  0 siblings, 2 replies; 3+ messages in thread
From: chas williams @ 2001-07-31 10:57 UTC (permalink / raw)
  To: linux-ia64

i solved my problem for the time being by linking directly with the
kernel.  i am again looking at trying to make patch the syscall
table to call a module.

the following does what i want:

GLOBAL_ENTRY(afs_syscall)
        movl r15=0xa0000000001749e0;;
        ld8 r16=[r15],8
        mov r14=gp;;
        ld8 gp=[r15]
        mov b6=r16;;
        br.few b6
END(afs_syscall)

however, its rather inconvenient to use 0xa0000000001749e0 since the
correct value changes somewhat.  normally i suspect one would write:

	addl r15=@ltoff(@fptr(real_afs_syscall#)),gp

but this would be wrong in this case since when the syscall occurred
i would using the kernel's gp and not the module's gp.  so i thought
i would write:

        .globl afs_syscall_fptr
afs_syscall_fptr:
        data8 0x0
        data8 0x0
GLOBAL_ENTRY(afs_syscall)
        movl r15¯s_syscall_fptr

and the module could fill in afs_syscall_fptr during init.  when i load
this though i get the following:

insmod: obj_ia64.c:258: obj_ia64_ins_imm64: Assertion `slot = 1' failed.

after looking the modutil code i guess that insmod is unable to insert
the relocation for my 64-bit absolute reference?  how should i write this?


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-08-01 20:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-31 10:57 [Linux-ia64] still patching syscall into module chas williams
2001-08-01 11:43 ` chas williams
2001-08-01 20:59 ` chas williams

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox