This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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]

[patch] add missing mips .bss.* section support


I noticed this while trying to get libmudflap working for a mips-elf
embedded target.  I was using the newlib-1.13.0 release.  It is missing
support for the .sbss.* and .bss.* sections.  libmudflap is compiled
with the -fdata-sections option, and so this results in linker errors
(relocation overflow) if the linker script doesn't handle .sbss sections
correctly.  Richard Sandiford fixed the .sbss.* problem in mainline
newlib, but the .bss.* support is still missing.

Building a mips-elf toolchain, and running the testsuite, I see that
this patch fixes 96 libstdc++ failures.  This is essentially the same
problem as my last patch, except with an updated toolchain, i.e.
gcc-4.1.x instead of gcc-4.0.1.  Now the compiler is using .bss.* COMDAT
sections instead of .gnu.linkonce.bss.* sections, and is failing for the
same reason previously described.  So we need to support both types of
bss sections in the linker scripts.

This patch adds the missing .bss.* support to all of the mips linker
scripts in libgloss.  The idt.ld script change was tested with a full
mips-elf toolchain build and make check.  It fixes 96 libstdc++
failures, and there were no regressions.  The other linker script
changes were tested with one simple testcase, to verify that I didn't
get a linker script parsing error.
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com

Attachment: patch.bss.sections
Description: Text document


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