From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KKyaj-0003zu-Uw for mharc-grub-devel@gnu.org; Mon, 21 Jul 2008 12:50:29 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KKyai-0003yR-FE for grub-devel@gnu.org; Mon, 21 Jul 2008 12:50:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KKyah-0003wZ-3a for grub-devel@gnu.org; Mon, 21 Jul 2008 12:50:27 -0400 Received: from [199.232.76.173] (port=42209 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKyag-0003wO-Uc for grub-devel@gnu.org; Mon, 21 Jul 2008 12:50:27 -0400 Received: from ug-out-1314.google.com ([66.249.92.171]:60957) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KKyag-0001BW-8U for grub-devel@gnu.org; Mon, 21 Jul 2008 12:50:26 -0400 Received: by ug-out-1314.google.com with SMTP id l31so300589ugc.48 for ; Mon, 21 Jul 2008 09:50:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:in-reply-to :references:content-type:date:message-id:mime-version:x-mailer; bh=gA6iTMHf9S6fIdplxYcf0zYmBjNUr1Yw+4OD6m/Q7h4=; b=m1K7atYTVcBy3YdYFLnYBZtPYJej7sD7VACtpencqYeMQqFZq435XdETFlIh9QyCOf 6w+hET2qv5S5gXYm8kRSoFSRrfX5b1F4GjYE/GIy9B3+2g/eqwFR9XORXXTQsGksOaPa hADtSiB1W/VtRC/ZflwLyzXINN6n1JdqY0Z/A= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer; b=lr4VHFaqISz6MP7eIhQp/mM1GSIkVm+pNd8YBM9Sx1/TyzbMX9zYYmPw4pTA3vp5e+ 2PGSCJ6jb1q22NO6isZXmvuoq3p4llSY574XX4SN5Ojy08ItkP+caLeQF358/+MKCPKP wisWP8H1qV8ldAhgV1zF25wwAFg5HDsttXNuE= Received: by 10.67.116.20 with SMTP id t20mr1752494ugm.58.1216659024647; Mon, 21 Jul 2008 09:50:24 -0700 (PDT) Received: from ?192.168.1.100? ( [213.37.137.93]) by mx.google.com with ESMTPS id 32sm8026103ugf.51.2008.07.21.09.50.22 (version=SSLv3 cipher=RC4-MD5); Mon, 21 Jul 2008 09:50:23 -0700 (PDT) From: Javier =?ISO-8859-1?Q?Mart=EDn?= To: The development of GRUB 2 In-Reply-To: <1216655461.3460.28.camel@dv> References: <4883A568.10709@t-online.de> <1KKshv-1kdy2C0@fwd33.aul.t-online.de> <1216638178.8334.153.camel@localhost> <1216655461.3460.28.camel@dv> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-czxHKG2a/XhtFXNY7jgM" Date: Mon, 21 Jul 2008 18:50:36 +0200 Message-Id: <1216659036.3033.10.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Re: [PATCH] Kernel fixes for Cygwin X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jul 2008 16:50:28 -0000 --=-czxHKG2a/XhtFXNY7jgM Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable El lun, 21-07-2008 a las 11:51 -0400, Pavel Roskin escribi=C3=B3: > On Mon, 2008-07-21 at 13:02 +0200, Javier Mart=C3=ADn wrote: > > El lun, 21-07-2008 a las 12:33 +0200, Christian Franke escribi=C3=B3: > > > due to the complexity of PE, a stand-alone converter may likely be > > > larger than the ~680 LoC converter I already offered here. > > Why do we even consider a PE->ELF converter? I think the easier way to > > go would have the people building GRUB in cygwin (not exactly newbies) > > to have an i386-pc-elf "cross compiler" built first, then use that for > > the bootloader programs and the normal gcc for tools. Even a "naked" > > (i.e. libraryless) cross compiler would work, since the bootloader part > > of GRUB is does not need libs (in C terminology, it's "freestanding"). > > That way, we are free from "objcopy bugs" or "BFD design limitations". >=20 > Well, if we want users to recompile their toolchain first, it's too much > to ask. I think it is not, since people building GRUB in Cygwin are not exactly newcomers to the land of compiling: this package requires that its files and modules be in ELF format; your compiler does not do it, so you need another compiler. End of the problem. Of course, another way to go could be to allow the bootloader part of GRUB to be built in PE format: it would "just" be a matter of writing the PE counterparts to kern/elf.c and abstracting kern/dl.c "a bit" (i.e. a lot of work). The downside to this, apart from the unspecified work required, is that Windows-built i386-pc-pe modules are no longer compatible with Linux-built i386-pc-elf. Not a showstopper, but might require a sober thinking. As I have a lot of free time right now, I'll try to think whether it's possible or not. > Maybe we could treat ELF header like a multiboot header? That means > that we write the header fields in the assembly language, substitute the > necessary variables and ask objcopy to make a raw binary that would > actually be an ELF file? As far as I understand the ELF format, this would be too complex to get right: there's a lot of info in there. >=20 > We could actually do it for all platforms, so that we won't depend on > the object file format. >=20 --=-czxHKG2a/XhtFXNY7jgM Content-Type: application/pgp-signature; name=signature.asc Content-Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQIVAwUASIS+W6Sl+Fbdeo72AQL3ow//Qx+6Yl9Yqf2B9jXnXzV83EEb1kcYw08c ZpCe29FEuG6GVcDE364bcqXpzDPYRwoC4uHus7r91rpJtg/6cNF4Y6icYZQQZLmc isHzNrCKS2IFR6qOoP4APa/GeCsMd+F/gx3HP6Wt4rVPKRU/s0TygPJvDLxpLxzL eo+wWYKcK85iBhXwbbI5G1fzgbQ3v4FAheIB6r3TdXfZ54Tw5kfQBgqOVM7P3bMt 0NqSX6ZMCHfCvbObGcqlbHcwRTdMX96foRPAlLIcpuh+jV46taS0OGLVkSm/w9Zv LOcaIXKs9MljyIeo+ydhdMmJbjfgE7xcJvN5GKV1eT9uowB8/bAx9mEn003CRYeE Hc8aq0ewt7vYT+zUyhc8ughxFDxSshOIcuyn7R1ykICf+yqM77C4rC8ZuJl/xHtl t3EzrADeHaXwAqJqACmldm4Riv51oQG0aJ4v45BKkzWNDG5qYTfzJPtzeNv1AEYU XdXEEVerRSGwtm5jrUE9qg/1ud56ecTCqh3ZRymK/HHLd/gdMKpt59TmE+aeqmjd HHefMtHCMgj3U1ZYbRz84iij62o94Tp/vcLXU6dN+4Ns3uLcCZDYzB7rqI4hG7lV KnoJIVNN+sVtdeSR4AsT93311qLBotGNNiNJEcup3OPwf3vvR0Nt3VcqMtVmkIuw 5dhQjCnWY0Q= =VFhN -----END PGP SIGNATURE----- --=-czxHKG2a/XhtFXNY7jgM--