exec-shield workaround take 2
Mike McCormack
mike at codeweavers.com
Sat Apr 10 20:27:15 CDT 2004
Hi Mike,
Mike Hearn wrote:
> It seems it's turned from being an normal (albiet static) app which
> reserves the areas needed then boots wine, into a reimplementation of
> ld-linux.so? I'm not sure it's a good plan to alter the .interp field -
> that has to be absolute and this technique would break binary
> relocatability.
>
> thanks -mike
At least in the Linux kernel, the ELF interpreter is loaded from the
current directory if it is not an absolute path. In this
implementation, I have forced the current directory to be the same as
the binary's directory, and saved the working directory in an
environment variable WINEWORKDIR.
The reason for doing this was to save the hastle of passing yet another
round of extra argv[0]'s to the execv. If it's determined that this
method is not portable, it's easy enough to go back to the other method
of using an executable instead of replacing the ELF interpreter.
In any case, this patch seems to work, and is not limited by binary
relocatability.
Mike
More information about the wine-devel
mailing list