This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: mips .bss switching patch
On Wed, Dec 13, 2000 at 02:13:23PM +0000, Graham Stott wrote:
> Aldy
>
> strcmp only takes 2 arguments.
>
> Graham
sigh. this is exactly the kind of stuff you hope never to do in public.
oh well.
here's the corrected patch.
aldy
2000-12-07 Aldy Hernandez <aldyh@redhat.com>
* config/mips/elf.h (ASM_OUTPUT_SECTION_NAME): emit @nobits
if changing into .bss section.
* config/mips/elf64.h: same.
* config/mips/iris6.h: same.
* config/mips/netbsd.h: same.
* config/mips/openbsd.h: same.
Index: elf64.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/elf64.h,v
retrieving revision 1.26
diff -c -r1.26 elf64.h
*** elf64.h 2000/09/25 13:22:47 1.26
--- elf64.h 2000/12/13 13:23:27
***************
*** 84,89 ****
--- 84,91 ----
fprintf (asm_out_text_file, "\t.section %s,\"ax\",@progbits\n", (NAME)); \
else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \
fprintf (F, "\t.section %s,\"a\",@progbits\n", (NAME)); \
+ else if (! strcmp (NAME, ".bss")) \
+ fprintf (F, "\t.section %s,\"aw\",@nobits\n", (NAME)); \
else \
fprintf (F, "\t.section %s,\"aw\",@progbits\n", (NAME)); \
} while (0)
Index: elf.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/elf.h,v
retrieving revision 1.23
diff -c -r1.23 elf.h
*** elf.h 2000/09/25 13:22:46 1.23
--- elf.h 2000/12/13 13:23:28
***************
*** 67,72 ****
--- 67,74 ----
fprintf (asm_out_text_file, "\t.section %s,\"ax\",@progbits\n", (NAME)); \
else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \
fprintf (F, "\t.section %s,\"a\",@progbits\n", (NAME)); \
+ else if (! strcmp (NAME, ".bss")) \
+ fprintf (F, "\t.section %s,\"aw\",@nobits\n", (NAME)); \
else \
fprintf (F, "\t.section %s,\"aw\",@progbits\n", (NAME)); \
} while (0)
Index: iris6.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/iris6.h,v
retrieving revision 1.24
diff -c -r1.24 iris6.h
*** iris6.h 2000/11/03 20:43:43 1.24
--- iris6.h 2000/12/13 13:23:29
***************
*** 379,384 ****
--- 379,386 ----
fprintf (asm_out_text_file, "\t.section %s,1,6,4,4\n", (NAME)); \
else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \
fprintf (F, "\t.section %s,1,2,0,8\n", (NAME)); \
+ else if (! strcmp (NAME, ".bss")) \
+ fprintf (F, "\t.section %s,\"aw\",@nobits\n", (NAME)); \
else \
fprintf (F, "\t.section %s,1,3,0,8\n", (NAME)); \
} while (0)
Index: netbsd.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/netbsd.h,v
retrieving revision 1.7
diff -c -r1.7 netbsd.h
*** netbsd.h 2000/11/02 23:29:12 1.7
--- netbsd.h 2000/12/13 13:23:30
***************
*** 214,219 ****
--- 214,221 ----
fprintf (asm_out_text_file, "\t.section %s,\"ax\",@progbits\n", (NAME)); \
else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \
fprintf (F, "\t.section %s,\"a\",@progbits\n", (NAME)); \
+ else if (! strcmp (NAME, ".bss")) \
+ fprintf (F, "\t.section %s,\"aw\",@nobits\n", (NAME)); \
else \
fprintf (F, "\t.section %s,\"aw\",@progbits\n", (NAME)); \
} while (0)
Index: openbsd.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/mips/openbsd.h,v
retrieving revision 1.2
diff -c -r1.2 openbsd.h
*** openbsd.h 2000/11/02 23:29:12 1.2
--- openbsd.h 2000/12/13 13:23:30
***************
*** 115,120 ****
--- 115,122 ----
fprintf (asm_out_text_file, "\t.section %s,\"ax\",@progbits\n", (NAME)); \
else if ((DECL) && DECL_READONLY_SECTION (DECL, RELOC)) \
fprintf (F, "\t.section %s,\"a\",@progbits\n", (NAME)); \
+ else if (! strcmp (NAME, ".bss")) \
+ fprintf (F, "\t.section %s,\"aw\",@nobits\n", (NAME)); \
else \
fprintf (F, "\t.section %s,\"aw\",@progbits\n", (NAME)); \
} while (0)