Subject: Re: COMPAT_LINUX: assembly level tricks (long)
To: None <port-powerpc@netbsd.org>
From: Emmanuel Dreyfus <p99dreyf@criens.u-psud.fr>
List: port-powerpc
Date: 01/17/2001 12:27:23
Christos Zoulas <christos@zoulas.com> wrote:

> You should be able to have the exec code put the argument wherever linux
> wants them. You can also check the version of the linker and put them in a
> different place so all versions work.

As far as I understand it, the problem is that ld-2.1.3.so expects the
argument at a given place, and then the linked programm expects them in
another place. (16 bytes lower). When the program is launched, ld.so
zeroed the place where the program expects the arguments, so duplicating
them does not work.

I think there might be a problem with stack alignement (ie: the stack
pointer is on a 16 bytes boundary + 8, ld.so align on the higher 16
bytes boundary and the program on the lower 16 bytes boundary). If
anyone see another reason, tell me.

-- 
Emmanuel Dreyfus.   
Il ne suffit pas de crier l'iMac, l'iMac! en sautant comme un cabri...
p99dreyf@criens.u-psud.fr