Re: PROBLEM: using _syscall4 to call sys_futex with -fPIC won'tcompile

From: Andreas Schwab
Date: Mon Jul 05 2004 - 11:04:23 EST


Benjamin Collar <benjamin.collar@xxxxxxxxxxx> writes:

> Greetings
>
> [1.]
> If I use _syscall4 in order to call sys_futex and compile with -fPIC, I
> receive this compiler error:
> "can't find a register in class `BREG' while reloading `asm'"

Don't do that then.

> [2.]
> I'm using futexes in a project and I have to build a shared library;
> thus I need to use -fPIC when compiling. When doing so, I get the error
> mentioned in [1.].

Don't use kernel headers in user space. Use syscall(3) instead.

Andreas.

--
Andreas Schwab, SuSE Labs, schwab@xxxxxxx
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/