From: Christian Franke <Christian.Franke@t-online.de>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: grub-pe2elf
Date: Fri, 31 Jul 2009 20:27:58 +0200 [thread overview]
Message-ID: <4A7337AE.5020505@t-online.de> (raw)
In-Reply-To: <20090731144632.GA14036@thorin>
Hi Robert,
Robert Millan wrote:
> On a recent discussion on IRC, Bean pointed out that grub-pe2elf is essentially
> a workaround for a bug in objcopy.
>
>
It is essentially a limitation of BFD: The object format specific
backends are apparently not implemented such that conversion between
different relocation formats is supported.
In particular, a relocation 'addend' (-4 in this case) is lost during
conversion if source or target relocation format do not support it as
separate field. Some conversions may work. PE -> ELF does not work, the
problem is in both backends in this case.
> Bean explained that this bug is quite obvious. It seems Christian sent them
> a patch, but it hasn't been applied (I don't know if it was rejected, or just
> ignored, Christian could you explain?).
>
>
The patch was actually an ad-hoc approach to fix it in objcopy itself
for the PE->ELF case only:
http://sourceware.org/ml/binutils/2007-10/msg00302.html
A generic solution which would have more chances to get accepted would
require substantial work in BFD itself. Conversion between relocation
formats is apparently rarely needed. A related bugzilla entry was
reopened in 2005 and is idle since then:
http://sourceware.org/bugzilla/show_bug.cgi?id=970
> Later in July 2008, Bean added grub-pe2elf to the repository.
>
>
Yes, and I really appreciated this :-)
> First of all, I'm worried that we have discussions to decide things and they
> are later forgotten or ignored. Bean, please can you provide some explanation
> on what happened?
>
> Also, I think this commit should be reverted (at least the part that adds
> grub-pe2elf).
I would regret this. Then you could also revert all my Cygwin related
additions (some also included in Bean's r1726) because these no longer
make much sense unless someone fixes BFD or maintains a ELF toolchain
for Cygwin.
> Nevertheless, it's not an obligation for us to support win32. As long as we
> can do it sanely, I'm fine with it, but I don't want to see GRUB dragged into
> a situation in which we need to preserve win32 support at all costs.
>
>
$ find grub2 -type f -name '*.[ch]' | xargs cat | wc -l
128175
$ cat grub2/util/grub-pe2elf.c | wc -l
521
0.4% of the total LoC is IMO less than 'all costs' :-)
--
Regards
Christian Franke
next prev parent reply other threads:[~2009-07-31 18:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-31 14:46 grub-pe2elf Robert Millan
2009-07-31 18:27 ` Christian Franke [this message]
2009-08-01 14:25 ` grub-pe2elf Robert Millan
2009-08-01 15:06 ` grub-pe2elf Christian Franke
2009-08-02 21:31 ` grub-pe2elf Robert Millan
2009-08-03 9:33 ` grub-pe2elf Christian Franke
2009-08-03 9:53 ` grub-pe2elf Vladimir 'phcoder' Serbinenko
2009-08-03 20:29 ` grub-pe2elf Pavel Roskin
2009-08-04 20:30 ` grub-pe2elf Robert Millan
2009-08-04 21:45 ` grub-pe2elf Christian Franke
2009-08-04 22:39 ` grub-pe2elf Robert Millan
2009-08-04 20:22 ` grub-pe2elf Robert Millan
2009-08-04 21:04 ` grub-pe2elf Christian Franke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A7337AE.5020505@t-online.de \
--to=christian.franke@t-online.de \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.