1 I *think* this bug has been fixed in the 3.4 tree. Unfortunately this
2 code changed significantly between 3.3 and 3.4 so it wasn't possible to
5 If the GCC tree is ever updated to 3.4 this patch won't apply. It can
6 probably be safely removed.
11 --- gcc/config/mips/mips.c.orig Mon Dec 29 06:30:42 2003
12 +++ gcc/config/mips/mips.c Mon Dec 29 07:16:35 2003
13 @@ -10535,11 +10535,13 @@
15 const char *name, *prefix;
17 - static const char *const prefixes[4][2] = {
18 + static const char *const prefixes[6][2] = {
19 { ".text.", ".gnu.linkonce.t." },
20 { ".rodata.", ".gnu.linkonce.r." },
21 { ".data.", ".gnu.linkonce.d." },
22 - { ".sdata.", ".gnu.linkonce.s." }
23 + { ".sdata.", ".gnu.linkonce.sb." },
24 + { ".bss.", ".gnu.linkonce.b." },
25 + { ".sbss.", ".gnu.linkonce.sb." }
28 name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
29 @@ -10551,8 +10553,9 @@
30 if (TREE_CODE (decl) == FUNCTION_DECL)
32 else if (DECL_INITIAL (decl) == 0
33 - || DECL_INITIAL (decl) == error_mark_node)
35 + || DECL_INITIAL (decl) == error_mark_node
36 + || initializer_zerop (DECL_INITIAL (decl)))
37 + sec = (size > 0 && size <= mips_section_threshold) ? 5 : 4;
38 else if ((TARGET_EMBEDDED_PIC || TARGET_MIPS16)
39 && TREE_CODE (decl) == STRING_CST
40 && !flag_writable_strings)