bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/20343] Document how to use LTO


From: dilyan.palauzov at aegee dot org
Subject: [Bug binutils/20343] Document how to use LTO
Date: Sun, 10 Jul 2016 19:39:39 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=20343

--- Comment #7 from dilyan.palauzov at aegee dot org <dilyan.palauzov at aegee 
dot org> ---
The part with bfd/plugin.c was a false alarm.

The problem was, that I had the change below, which was supposed to fix these
warnings, when I compile binutils with -flto (cf.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70611):


/git/binutils-gdb/libiberty/make-relative-prefix.c: In function
'make_relative_prefix_1.constprop':
/git/binutils-gdb/libiberty/make-relative-prefix.c:228:1: error: stack usage
might be unbounded [-Werror=stack-usage=]
 make_relative_prefix_1 (const char *progname, const char *bin_prefix,
 ^
lto1: all warnings being treated as errors

Nevertheless, there is no documentation to state, that the linker plugin shall
be installed in bfd-plugins/.

index fe639d1..dba3429 100644
--- a/libiberty/make-relative-prefix.c
+++ b/libiberty/make-relative-prefix.c
@@ -256,7 +256,7 @@ make_relative_prefix_1 (const char *progname, const char
*bin_prefix,
 #ifdef HAVE_HOST_EXECUTABLE_SUFFIX
          len += strlen (HOST_EXECUTABLE_SUFFIX);
 #endif
-         nstore = (char *) alloca (len);
+         nstore = (char *) malloc (len);

          startp = endp = temp;
          while (1)
@@ -304,6 +304,7 @@ make_relative_prefix_1 (const char *progname, const char
*bin_prefix,
              else
                endp++;
            }
+         free(nstore);
        }
     }

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

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