--gc-sections causes assertion failure
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linaro Binutils |
Incomplete
|
Undecided
|
Unassigned | ||
Linaro Toolchain Binaries |
New
|
Undecided
|
Charles Baylis |
Bug Description
When running with the Linaro GCC 4.8.1 2013.08 release, I get the following assertion when using -ffunction-sections and -fdata-sections to GCC along with --gc-sections to LD. From searching the web, it looks like there are various possible reasons for the assertion in upstream binutils, but I couldn't narrow it down directly as they were slightly different.
c:/gnu/
This corresponds to the first assert in the code below:
if (may_need_
&& elf32_arm_
{
/* If PLT refcount book-keeping is wrong and too low, we'll
see a zero value (going to -1) for the root PLT reference
count. */
if (root_plt->refcount >= 0)
{
BFD_ASSERT (root_plt->refcount != 0);
}
else
/* A value of -1 means the symbol has become local, forced
or seeing a hidden definition. Any other negative value
is an error. */
BFD_ASSERT (root_plt->refcount == -1);
Changed in linaro-toolchain-binaries: | |
assignee: | nobody → Charles Baylis (cbaylis) |
Thanks for the bug report. Unfortunately, I can't reproduce this problem, could you provide an example or a link to code which causes this?