public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "davek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/46291] [4.6 Regression] Failed to bootstrap-lto
Date: Wed, 03 Nov 2010 20:49:00 -0000	[thread overview]
Message-ID: <bug-46291-4-TNLrVdahAp@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-46291-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46291

Dave Korn <davek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2010.11.03 20:49:18
         AssignedTo|unassigned at gcc dot       |davek at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #2 from Dave Korn <davek at gcc dot gnu.org> 2010-11-03 20:49:18 UTC ---
I have found the problem.  There is an ambiguity in the plugin interface spec.

http://gcc.gnu.org/wiki/whopr/driver says

" Input Files
  [ ... ]
  struct ld_plugin_input_file
  {
    const char *name;
    int fd;
  [ ... ]
  };
  [ ... ]
fd: An open file descriptor for the input file. The current position in the
file is undefined (i.e., the plug-in must call lseek before reading). If the
plug-in 
                                                                 ^^^^^^^^^^^^^^
claims the file, it will then own the file descriptor and has the
responsibility 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
for closing it. If the plug-in does not claim the file, it must leave it open,
but
^^^^^^^^^^^^^^^
it is not required to maintain the current position in the file. "

However it also says:

" Plugin Interfaces
  [ ... ]
4. 
  [ ... ]
Whether the file is claimed or not, the linker maintains responsibility for
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
opening and closing the file as necessary."
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Oops.  Guess which way LD does it?  Guess which way GOLD does it?

Ian?  Which way should this really be?

While we decide, I have a patch that will fix lto-bootstrap by detecting which
linker is calling onload and deciding whether or not to close the fd on that
basis.


  parent reply	other threads:[~2010-11-03 20:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-03 16:17 [Bug lto/46291] New: " hjl.tools at gmail dot com
2010-11-03 16:17 ` [Bug lto/46291] " hjl.tools at gmail dot com
2010-11-03 17:13 ` davek at gcc dot gnu.org
2010-11-03 20:49 ` davek at gcc dot gnu.org [this message]
2010-11-03 20:51 ` davek at gcc dot gnu.org
2010-11-03 21:31 ` ccoutant at gcc dot gnu.org
2010-11-03 21:35 ` davek at gcc dot gnu.org
2010-11-03 21:42 ` davek at gcc dot gnu.org
2010-11-03 21:44 ` davek at gcc dot gnu.org
2010-11-03 23:14 ` davek at gcc dot gnu.org
2010-11-03 23:15 ` davek at gcc dot gnu.org

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=bug-46291-4-TNLrVdahAp@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).