This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[committed] libmudflap _start/_end not small data


I am getting gp relocation overflow errors linking in libmudflap for a
mips-elf target.  The errors are for the special _start and _end
symbols, which are used in mf-heuristics.c.  They are declared here as
simple characters, which the compiler assumes are in the small data
section.  However, these are special symbols set by the linker script,
and will never be in any small data section.

This problem is easy to fix by declaring them as unbounded arrays of
characters.  This will ensure that the compiler will never think that
they are in the small data section.  This same trick is already used in
a number of places in gcc and newlib for the same special symbols; it is
the standard solution for this problem.

This patch has been tested with a mainline x86_64-linux C and C++ build
with a libmudflap make check.  There were no regressions.  It has also
been tested with a gcc-4.0.1 mips-elf cross compiler with a number of
patches and workarounds applied.  I get 12 passes without this patch;
and 516 passes with this patch.

I have checked in the patch.
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com

Attachment: patch.start.end
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]