public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "iains at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug lto/48094] ld: warning: section has unexpectedly large size errors in objc/obj-c++ lto
Date: Mon, 05 Dec 2011 21:03:00 -0000	[thread overview]
Message-ID: <bug-48094-4-cT7MTb0vP9@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-48094-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #12 from Iain Sandoe <iains at gcc dot gnu.org> 2011-12-05 21:01:09 UTC ---
(In reply to comment #11)

> I think that later versions of the vendor's tools make some of the ObjC
> sections merge-able - so that's a possibility 

Unfortunately, not the _image_info sections.

===

So .. this is the problem....

We have n object files input to lto.  Each object contains ObjC meta-data...
including a single var in the _image_info section.

Although these image_info  vars will eventually be overlaid, they are not
common-like - because they can be non-zero.

(Darwin's) ld can merge them, because ld knows that the property of the
_image_info section is that it holds a single instance of the L_OBJC_ImageInfo
variable.

So ld can check that these are compatible between objects, and merge/error as
appropriate.

but LTO will concatenate them - leading to two problems:
 (a) the section appears to be too big - complaint from later versions of ld
and 
 (b) they are no longer being error-checked and combined - which might have
much more subtle implications.

> - otherwise - Honza any suggestions?

e.g.
Is there any annotation or hook that we can use to emulate this behavior?

(I don't think DECL_ONE_ONLY is quite right because it might be [legitimately]
possible for the vars to have differing values - I need to check that
carefully)

I guess, ideally, the ObjC meta-data should be re-created after LTO has done
its magic -- but that's def. not a stage 3 type job ...

.. maybe move it to be a late (Post Optimization) pass? 

[ISTM, at a first consideration, there should be no need to optimize ObjC
metadata under those circumstances, since it should only be created as required
in response to the remaining (optimized) content]


  parent reply	other threads:[~2011-12-05 21:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-12 17:31 [Bug lto/48094] New: " howarth at nitro dot med.uc.edu
2011-03-12 17:32 ` [Bug lto/48094] " howarth at nitro dot med.uc.edu
2011-03-12 17:49 ` iains at gcc dot gnu.org
2011-03-12 18:38 ` iains at gcc dot gnu.org
2011-03-13 12:13 ` iains at gcc dot gnu.org
2011-03-14  9:40 ` iains at gcc dot gnu.org
2011-11-14  0:05 ` iains at gcc dot gnu.org
2011-12-03 15:50 ` howarth at nitro dot med.uc.edu
2011-12-03 18:32 ` iains at gcc dot gnu.org
2011-12-05 15:25 ` howarth at nitro dot med.uc.edu
2011-12-05 15:31 ` howarth at nitro dot med.uc.edu
2011-12-05 17:24 ` iains at gcc dot gnu.org
2011-12-05 21:03 ` iains at gcc dot gnu.org [this message]
2011-12-06  0:50 ` steven at gcc dot gnu.org
2011-12-06  9:13 ` iains at gcc dot gnu.org
2012-02-12 14:44 ` iains at gcc dot gnu.org
2013-07-16 12:05 ` iains at gcc dot gnu.org
2013-07-16 19:12 ` iains at gcc dot gnu.org
2013-09-14 15:34 ` [Bug target/48094] " iains at gcc dot gnu.org
2013-09-14 15:36 ` iains at gcc dot gnu.org
2013-09-14 15:40 ` iains at gcc dot gnu.org
2013-09-15 18:32 ` mrs at gcc dot gnu.org
2014-04-07  6:41 ` dominiq at gcc dot gnu.org
2014-04-07  8:01 ` dominiq 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-48094-4-cT7MTb0vP9@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).