This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug lto/41681] Feature request half way option between dynamic and static linking.
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Oct 2009 09:46:33 -0000
- Subject: [Bug lto/41681] Feature request half way option between dynamic and static linking.
- References: <bug-41681-10492@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #4 from rguenth at gcc dot gnu dot org 2009-10-13 09:46 -------
So your half-way would be only useful for static analysis, but not for any
optimization decision. Consider a function currently being
void doIt() {}
in the shared library. Now, if GCC sees the body it can deduce that calls
to it are useless and it will DCE them. Next, the shared library
implementation
changes to
void doIt() { printf("Hello"); }
which is perfectly valid. Thus, GCC has miscompiled the program.
So - it's not going to work in any way that will give extra information
to GCC.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41681