URL:
<http://savannah.gnu.org/support/?108559>
Summary: libtool binary wrappers fall prey to aggressive
optimizations
Project: GNU Libtool
Submitted by: lrn
Submitted on: Fri 02 May 2014 05:16:44 AM GMT
Category: None
Priority: 5 - Normal
Severity: 3 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Operating System: None
_______________________________________________________
Details:
When building binary wrappers (say, for W32), libtool puts a MAGIC constant
string into them. Later on libtool greps the program for this string to see
whether this is a wrapper or a real program.
However, MAGIC string is not used in the program in any way, and gcc may
remove it. This does happen when building with -flto.
My proposal would be to make use of the string somehow to fool gcc into
leaving it alone. For example, this call:
lt_fatal (__FILE__, __LINE__,
"unrecognized %s option: '%s'",
ltwrapper_option_prefix, argv[i]);
can be changed like this:
lt_fatal (__FILE__, __LINE__,
"unrecognized %s option: '%s'\0%s",
ltwrapper_option_prefix, argv[i], MAGIC_EXE);
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/support/?108559>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool