libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sr #108559] libtool binary wrappers fall prey to aggressive optimizatio


From: LRN
Subject: [sr #108559] libtool binary wrappers fall prey to aggressive optimizations
Date: Fri, 02 May 2014 05:16:46 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Firefox/31.0

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/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]