Bug 47410 - Linker plugin specification makes it difficult to handle mixed IR/non-IR objects
Summary: Linker plugin specification makes it difficult to handle mixed IR/non-IR objects
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: lto (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on: 47247
Blocks: mozillametabug
  Show dependency treegraph
 
Reported: 2011-01-22 05:06 UTC by H.J. Lu
Modified: 2011-01-22 16:49 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2011-01-22 05:06:36 UTC
+++ This bug was initially created as a clone of Bug #47247 +++

Current linker plugin specification has problem with mixed
IR/non-IR inputs.  When a function, foo, in IR input is only
called from non-IR input, LTO thinks foo is never called and
optimizes it out. See:

http://sourceware.org/bugzilla/show_bug.cgi?id=12430

LTO API should have a way for linker to inform LTO that
a symbol is referenced from non-IR input.
Comment 1 H.J. Lu 2011-01-22 13:28:06 UTC
It is a linker bug, which has been fixed.
Comment 2 Jan Hubicka 2011-01-22 16:06:27 UTC
How it was fixed?
Comment 3 H.J. Lu 2011-01-22 16:49:54 UTC
(In reply to comment #2)
> How it was fixed?

It is very trivial. Linker just needs to add the object-only file
to input file list:

http://git.kernel.org/?p=devel/binutils/hjl/x86.git;a=patch;h=31ef643b40d1fe0953d2acf465d06d9175b56b79