X-Git-Url: http://git.megacz.com/?p=org.ibex.core.git;a=blobdiff_plain;f=upstream%2Fgcc-3.3%2Fpatches%2Fgcc-fdata-sections-bss.patch;fp=upstream%2Fgcc-3.3%2Fpatches%2Fgcc-fdata-sections-bss.patch;h=3a99ce47ce196890fd5dfd5dcfe18ceb0a89cfce;hp=0000000000000000000000000000000000000000;hb=12c071b8655bc93d0bc80ed755e62aa2a44837b3;hpb=baed1480fbb1d933f73f31a0fcf10b07688aacaf diff --git a/upstream/gcc-3.3/patches/gcc-fdata-sections-bss.patch b/upstream/gcc-3.3/patches/gcc-fdata-sections-bss.patch new file mode 100644 index 0000000..3a99ce4 --- /dev/null +++ b/upstream/gcc-3.3/patches/gcc-fdata-sections-bss.patch @@ -0,0 +1,40 @@ +I *think* this bug has been fixed in the 3.4 tree. Unfortunately this +code changed significantly between 3.3 and 3.4 so it wasn't possible to +backport the fix. + +If the GCC tree is ever updated to 3.4 this patch won't apply. It can +probably be safely removed. + +-Brians + + +--- gcc/config/mips/mips.c.orig Mon Dec 29 06:30:42 2003 ++++ gcc/config/mips/mips.c Mon Dec 29 07:16:35 2003 +@@ -10535,11 +10535,13 @@ + int len, size, sec; + const char *name, *prefix; + char *string; +- static const char *const prefixes[4][2] = { ++ static const char *const prefixes[6][2] = { + { ".text.", ".gnu.linkonce.t." }, + { ".rodata.", ".gnu.linkonce.r." }, + { ".data.", ".gnu.linkonce.d." }, +- { ".sdata.", ".gnu.linkonce.s." } ++ { ".sdata.", ".gnu.linkonce.sb." }, ++ { ".bss.", ".gnu.linkonce.b." }, ++ { ".sbss.", ".gnu.linkonce.sb." } + }; + + name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl)); +@@ -10551,8 +10553,9 @@ + if (TREE_CODE (decl) == FUNCTION_DECL) + sec = 0; + else if (DECL_INITIAL (decl) == 0 +- || DECL_INITIAL (decl) == error_mark_node) +- sec = 2; ++ || DECL_INITIAL (decl) == error_mark_node ++ || initializer_zerop (DECL_INITIAL (decl))) ++ sec = (size > 0 && size <= mips_section_threshold) ? 5 : 4; + else if ((TARGET_EMBEDDED_PIC || TARGET_MIPS16) + && TREE_CODE (decl) == STRING_CST + && !flag_writable_strings)