public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug objc/48109] New: Objective-C class defs/refs are lost under LTO on Darwin for ABI0/1
@ 2011-03-14  9:37 iains at gcc dot gnu.org
  2011-03-14 10:23 ` [Bug objc/48109] " mikestump at comcast dot net
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: iains at gcc dot gnu.org @ 2011-03-14  9:37 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: Objective-C class defs/refs are lost under LTO on
                    Darwin for ABI0/1
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: objc
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: iains@gcc.gnu.org
              Host: *-apple-darwin*
            Target: *-apple-darwin*
             Build: *-apple-darwin*


This is a FE bug that manifests only on Darwin/NeXT (m32) under LTO.

(originally reported as part of PR48094)

e.g.

-L/sw/src/fink.build/gcc46-4.6.0-1000/darwin_objdir/x86_64-apple-darwin10.7.0/i386/libobjc/.libs
  -lobjc     -m32 -o objc-dg-lto-trivial-1-21    (timeout = 300)
ld: warning: section __OBJC/__image_info has unexpectedly large size 16 in
/var/tmp//ccMlEsXS.lto.o^M
Undefined symbols for architecture i386:^M
  ".objc_class_name_myRootObject", referenced from:^M
      pointer-to-literal-objc-class-name in ccMlEsXS.lto.o^M
      pointer-to-literal-objc-class-name in ccMlEsXS.lto.o^M
ld: symbol(s) not found for architecture i386^M

---

The reason is an anachronism in using target macros to emit efficient
representations of class presence and requirement
(ASM_DECLARE_CLASS_REFERENCE/ASM_DECLARE_UNRESOLVED_REFERENCE).

.. because of this, there are no real vars representing the
presence/requirement for the classes and, when LTO is engaged, the information
is lost.

The separate external defs/refs are required because the class metadata
structures are all local to a given TU.  The refs meet the linkage
requirements.

For the m64 ABI-2 this is not longer an issue, since class metadata definitions
are now external and thus visible without additional action.


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-09-01 20:11 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-14  9:37 [Bug objc/48109] New: Objective-C class defs/refs are lost under LTO on Darwin for ABI0/1 iains at gcc dot gnu.org
2011-03-14 10:23 ` [Bug objc/48109] " mikestump at comcast dot net
2011-03-14 10:29 ` iains at gcc dot gnu.org
2011-03-14 11:27 ` rguenth at gcc dot gnu.org
2011-03-14 11:36 ` iains at gcc dot gnu.org
2011-03-14 18:20 ` iains at gcc dot gnu.org
2011-03-14 18:31 ` iains at gcc dot gnu.org
2011-03-14 20:51 ` iains at gcc dot gnu.org
2011-03-14 23:39 ` mikestump at comcast dot net
2011-04-28 16:12 ` rguenth at gcc dot gnu.org
2011-06-29 20:09 ` iains at gcc dot gnu.org
2012-07-09  8:43 ` iains at gcc dot gnu.org
2013-09-01 20:11 ` iains at gcc dot gnu.org

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).