This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/54303] -fdata-sections -ffunction-sections and -fmerge-constants do not work well together
- From: "pbrook at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 01 Oct 2012 17:55:28 +0000
- Subject: [Bug c/54303] -fdata-sections -ffunction-sections and -fmerge-constants do not work well together
- Auto-submitted: auto-generated
- References: <bug-54303-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54303
Paul Brook <pbrook at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pbrook at gcc dot gnu.org
--- Comment #7 from Paul Brook <pbrook at gcc dot gnu.org> 2012-10-01 17:55:28 UTC ---
I believe the arm v.s. x86 differences are a red herring. You'll notice that
one of the strings happens to be a multiple of 8 bytes long, so by default gcc
chooses to align it, in the hope that we'll hit a fast patch in memcpy. On ARM
we choose to use word alignment unconditionally for similar reasons. This is
reasonable, the effectiveness of this alignment will depend on the performance
characteristics of the str* and mem* functions.
Arguably this is a linker bug. It should be able to remove unused elements
from mergeable string sections.