[google] Fix a bug leading to inconsistent comdat group in LIPO mode (issue4616041)

Submitted by Xinliang David Li on June 14, 2011, 7:13 a.m.

Details

Message ID 20110614071311.60C6C201F2@syzygy.mtv.corp.google.com
State New
Headers show

Commit Message

Xinliang David Li June 14, 2011, 7:13 a.m.
The patch will be committed to google/main to fix a problem in LIPO model
that leads to 'reference to discarded comdat section' ld warning. The problem
is caused by inconsistent comdat groups between primary and aux modules because
thunks were skipped in aux module.

2011-06-14   David Li  <davidxl@google.com>

	* cp/semantics.c (emit_associated_thunks):
	Do not omit thunk emission for aux modules.


--
This patch is available for review at http://codereview.appspot.com/4616041

Patch hide | download patch | download mbox

Index: cp/semantics.c
===================================================================
--- cp/semantics.c	(revision 174851)
+++ cp/semantics.c	(working copy)
@@ -3415,8 +3415,7 @@  emit_associated_thunks (tree fn)
      enabling you to output all the thunks with the function itself.  */
   if (DECL_VIRTUAL_P (fn)
       /* Do not emit thunks for extern template instantiations.  */
-      && ! DECL_REALLY_EXTERN (fn)
-      && ! cgraph_is_auxiliary (fn))
+      && ! DECL_REALLY_EXTERN (fn))
     {
       tree thunk;