Linda Walsh wrote:
> Ouch. So lemme think...is it possible for some code macro to detect
> it's being compiled pic on the x86 and use alternate macros that
> save the appropriate registers?
Look at the source to Glibc. They have to deal with this issue.
> The reason I ask is that other wise we are likely going to have to
> come up with custom syscall macros for each platform -- now those
> macros may be exactly the same as the original on other platforms (they
> may not have this problem), but it's alot of icky wasted code space.
> In this case, we *are* the library, so my fear is writing pic code
> that works on x86 but doesn't on another. It'd be nice not to
> come up with a different mechanism if this isn't broken in the same
> way on the other platforms, but to instead fix the x86 platform.
> In this situation, we are the library writer, so what we want to stay
> away from is having to write platform specific code in the library.
In normal cases, your library wouldn't be making the syscall itself.
Glibc would hide it with its own stubs. Since it sounds like you are
creating a new syscall, Glibc doesn't know about it yet.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to email@example.com 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