[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/16934] gc-sections fails to remove unused C++ member functions
From: |
nickc at redhat dot com |
Subject: |
[Bug ld/16934] gc-sections fails to remove unused C++ member functions |
Date: |
Wed, 18 Jun 2014 16:03:17 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=16934
--- Comment #6 from Nick Clifton <nickc at redhat dot com> ---
Have you tried enabling link-time optimization in gcc. Ie compiling with -lfto
added to the g++ command lines. This appears to work for the test case you
supplied.
The problem I believe is related to the virtual nature of the functions, which
are not invoked directly, but rather via pointers stored in a table. The
linker is not sophisticated enough to be able to determine which entries in a
given table are unused, so it cannot delete the unneeded virtual functions.
Cheers
Nick
--
You are receiving this mail because:
You are on the CC list for the bug.