lkml.org 
[lkml]   [2000]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: _syscall2 in PIC code on ix86

On 14 Jan 2000, H. Peter Anvin wrote:

> Followup to: <Pine.LNX.4.10.10001140916500.1983-100000@mullet.itr.unisa.edu.au>
> By author: Alan Modra <alan@SPRI.Levels.UniSA.Edu.Au>
> In newsgroup: linux.dev.kernel
> >
> > On Thu, 13 Jan 2000, Keith Owens wrote:
> >
> > > Has anybody succeeded in using _syscall2 in code compiled with -fPIC on
> > > ix86? I'm trying to convert modutils to a shared library and the
> >
> > If you want to use the standard syscall macros, then you're out of luck,
> > I'm afraid. %ebx is a reserved register in x86 PIC code, and all syscalls
> > (except for syscall0) use ebx. Have a look at the definition of _syscall6
> > for a way to code your own syscall macros that work with PIC.
> >
>
> We probably should add a set of macros that include PIC support
> (_syscallX_pic)... it seems to me the obvious way to deal with this
> seems to push/pop %ebx around the syscall.

Yup. Hence my comment about looking at _syscall6 which does the same for
%ebp. It's more than just a bit tricky to make a PIC version of _syscall6
though.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.478 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site