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] |
This is similar in spirit to one of my bug fixes last week. libmudflap has configure code to check for the name of the entry point symbol. Unfortunately, it declares the variable as type char, which for a target like mips-elf means the compiler will assume it is in the small data section, and then we end up with a gp reloc overflow error from the linker. The standard trick to avoid this problem is to declare it as an array of unbounded size. This is a little tricky, as this is in m4 macro code and using square brackets are special quoting characters here, so I used autoconf quadrigraphs. I got the idea from the libssp configure.ac file, and verified it was OK by checking the autoconf manual. This was tested with a mips-elf --enable-libmudflap build. I get a configure failure without this patch. With this patch (and a toplevel Makefile FLAGS_FOR_TARGET workaround), libmudflap builds fine. I have checked in the patch. -- Jim Wilson, GNU Tools Support, http://www.specifix.com
Attachment:
patch.start.array
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |