qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Patch to fix Mac OS X compilation


From: Jonas Maebe
Subject: Re: [Qemu-devel] Patch to fix Mac OS X compilation
Date: Sun, 13 Feb 2005 15:30:53 +0100


On 12 feb 2005, at 21:47, Jonas Maebe wrote:

I've attached a patch to fix Mac OS X compilation (and some small cleanup of the Mach-O code in dyngen.c as well). Unfortunately, qemu "crashes" (i.e., reports a fatal error) almost immediately when trying to boot freedos, so it seems there are more errors. Hopefully, someone else can fix those now that compilation works again.

Here's a better patch, there were still some errors in my fixes to the calculation of the relocations.

Now, qemu crashes with an "invalid instruction" error. The reason is that the __op_gen_label stuff does not get properly relocated. This is caused by the fact that for some reason the relocation of branches is done differently under Mac OS X and Linux: under Mac OS X, the original symbol is used in the calculations, while under Linux the relocated one is used (and the reason for that seems to be that looking up the relocated symbol of branch instructions often gives wrong results in the current Mach-O code).

It is possible to make a special case for __op_gen_label so that it does get replaced by the proper gen_labels[] expression, but even then I still get crashes (either because the branch points to a wrong address, or because the gen_labels array is not initialised properly).

I won't be working further on this in the near future, since I won't have time.


Jonas

Attachment: qemu-macosx2.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]