syscall defines deficiency or gcc bug?

From: Linda Walsh (law@sgi.com)
Date: Wed Aug 02 2000 - 16:26:20 EST


I have some code that includes asm-i386/unistd.h and has defines for
the functions I want to call (audit related)

Thing is, that I want to also be able to call those functions in
a shared library compiled with -fpic (or -fPIC). When I use the
fpic option to gcc, I get:

asm-audit.h: In function `aud_setluid':
asm-audit.h:17: Invalid `asm' statement:
asm-audit.h:17: fixed or forbidden register 3 (bx) was spilled for class BREG.

That line contains:
_syscall1(int, aud_setluid, uid_t, luid)

Basically and syscall definition I use that has input arguments gets
the above error message. Functions with no arguments generate no
error.

The problem appears to lie in gcc's global register allocator. 'greg'.
So what I'm wondering is "does this point to a bug in gcc"? or is there
some different way the syscalls could be defined to make them portable
between both cases?

Darndest thing!
thanks for any tips,
-linda

--
Linda A Walsh                    | Trust Technology, Core Linux, SGI
law@sgi.com                      | Voice: (650) 933-5338                        

- 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/



This archive was generated by hypermail 2b29 : Mon Aug 07 2000 - 21:00:09 EST