linux emulation: Preliminary support for more auxvec's [patch]
Marcin Cieslak
saper at system.pl
Fri Jul 11 21:39:07 UTC 2008
Kostik Belousov wrote:
> Do you know of any situation where we _must_ have those new auxvec you
> implemented ?
No, I learned about them today when I analyzed my auxvec fingerprint
from the real amd64 and i386 Linux boxes.
>
>>
>> http://akson.sgh.waw.pl/~saper/FreeBSD/linux/auxvec.diff
> I only briefly looked over it.
>
> I suggest that the new AT_COUNT requires more thinking. Look at the
> src/libexec/rtld-elf/rtld.c, _rtld(), at line 338, where the auxvec is
> digested by FreeBSD dynamic linker. It seems to be harmless, but at
> least this is inconsistent. May be, AT_LINUX_PLATFORM etc defines
> would make more sense.
machine/elf.h will get updated with installworld (or make install in
includes) and rtld should get be recompiled with this.
I did this and it works fine as it worked. The impact of this is
limited, since all the auxvec's rtld need are stored early.
I don't think the AT_COUNT things is correct.
>
> Do you actually need imgp->machine member ? It seems that it is used
> only inside linux_copyout_strings ?
No, it's referenced in elf_linux_fixup - that's the reason I need it.
>> This was made against 7-STABLE, but there no major differences in
>> -current. It is also trivial to port to 64-bit amd64 emulation.
> Hmm, what are you referencing there ? I know only about one mostly
> stalled effort.
Well, anyway the logic is pretty platform-independent and one needs to
be careful about pointer sizes (AT_PLATFORM) and such.
Newly introduced linux_get_machine should take care of the 64-bit case.
If we are going to support dynamic switching between 32 and 64 bit code
this will need to be dynamic as well ("x86_64" vs "i686").
I have my doubts about the linux_times() function in linux_misc.c,
it tries to convert the clock tick to the FreeBSD value. Maybe it's no
longer necessary.
If this is a problem, we can hardcode value "100" as being returned.
--Marcin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 273 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-emulation/attachments/20080711/eb32999b/signature.pgp
More information about the freebsd-emulation
mailing list