[Mono-devel-list] Re: [Gtk-sharp-list] kernel support.
Carlos Perelló Marín
18 Jun 2003 10:37:15 +0200
Content-Type: multipart/mixed; boundary="=-skH2wyEHQwSq8f+jnQVW"
Content-Type: text/plain; charset=iso-8859-15
El mar, 17-06-2003 a las 23:46, Dag Wieers escribi=F3:
> On 17 Jun 2003, Carlos [ISO-8859-1] Perell=F3 Mar=EDn wrote:
> > > And actually it is a workaround for shortcomings in the way binfmt_mi=
> > > works. Whereas it has some overhead too. So the proper solution is to=
> > > a binfmt_exe module in the kernel (that can be compiled seperately) o=
> > > make binfmt_misc able to make a difference between Windows executable=
> > > and .Net binaries.
> > Hmmm I have wine and mono installed and that solution works for me, whe=
> > I execute a .NET binary it uses mono and when I execute any other
> > Windows binary it uses wine.
> > I don't see where is the problem...
> Ok, now try to convince Red Hat, SuSE, TurboLinux, Mandrake, Lindows to=20
> fix their packages and release updates to their wine package now.=20
> And I'm sure you can overwrite what other packages do, but that's not a=20
> real clean solution and you may not have control what an upgrade will do.
I think that the solution does not change wine files, as you can read
with the attached file, it's only a modification inside binfmt-support
> "It works" doesn't necessarily make it the best solution. A shell wrapper=
> works too.
It works for all .net executables and the user does not need to know
that she needs a wrapper to execute a mono program.
I think it's the best option :-P
> -- dag wieers, email@example.com, http://dag.wieers.com/ --
> [Any errors in spelling, tact or fact are transmission errors]
> Mono-devel-list mailing list
Carlos Perell=F3 Mar=EDn
Debian GNU/Linux Sid (PowerPC)
Linux Registered User #121232
mailto:firstname.lastname@example.org || mailto:email@example.com
Valencia - Spain
Content-Disposition: attachment; filename=detectors
Content-Type: message/rfc822; name=detectors
From: Colin Watson <firstname.lastname@example.org>
To: Ove Kaaven
Cc: Alp Toker
Subject: Cooperation between Mono and Wine for binary formats
Date: 18 Jun 2003 10:34:51 +0200
The following is a specification for extended binary format
specifications in binfmt-support. It is being written to support the
needs of the Mono packages. The .NET binary format is sufficiently
similar to that used by Wine for ordinary Win32 executables that the
decision on which to use is beyond the support provided by the
binfmt_misc kernel module and needs to be delegated to a userspace
(This necessarily involves making things a little more convoluted, but I
hope not by too much. Bear with me.)
A new command-line option, and corresponding format file option, is
added, namely --detector. If this option is present, it is to be
followed by the full path to an executable. If all other conditions in a
binary format specification succeed, this executable will be run with
the path to the binary in question as its first argument before the
interpreter is considered for execution.
Several different detector/interpreter pairs may be present with
otherwise identical format strings. Each detector is run in turn, in a
currently unspecified order, until one succeeds, i.e. returns a zero
exit status. The corresponding interpreter will then be run as normal.
If several identical format strings are present with no detector, they
will be considered to have a detector of /bin/true which is run last of
all (this may help with transitions).
Implementation notes: If any detectors are present for a given
kernel-level format, then /usr/share/binfmt-support/run-detectors (or
similar) is called instead of the usual interpreter. This calls each
configured detector in turn and then execv()'s the first interpreter
that succeeds. If none succeed, it prints an error message and exits
As far as wine is concerned, the modification should be as follows: add
/usr/lib/wine/binfmt-detector-wine or similar with the Win32 format
detection code (Alp has the details of this, it's a few dozen lines of
C), and add 'detector /usr/lib/wine/binfmt-detector-wine' to
The intention of all this is that users can run a random Windows
executable with the MZ magic string and it will be passed off
transparently to the appropriate interpreter, while keeping the
packaging as simple as possible and avoiding the need for extra bridging
packages (the original idea of having a single program that knows how to
tell between Win32 and .NET executables and hands them off accordingly
would have required an extra package and associated cruft in
The Wine package doesn't need to be modified under this scheme in order
for Mono to work, due to the /bin/true shim for format strings without
detectors, so the transition can be quite painless. However, unless it
is modified, binfmt_misc will attempt to run Wine over .NET executables
if Mono is not installed.
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
-----END PGP SIGNATURE-----