elf.h (ASM_OUTPUT_DEF,ASM_WEAKEN_LABEL, [...]): Define.
authorGavin Koch <gavin@cygnus.com>
Wed, 29 Apr 1998 12:12:08 +0000 (12:12 +0000)
committerGavin Romig-Koch <gavin@gcc.gnu.org>
Wed, 29 Apr 1998 12:12:08 +0000 (12:12 +0000)
* config/mips/elf.h (ASM_OUTPUT_DEF,ASM_WEAKEN_LABEL,
ASM_OUTPUT_WEAK_ALIAS): Define.
* config/mips/elf64.h: Same.
* config/mips/r3900.h (ASM_OUTPUT_DEF,SUPPORTS_WEAK,
ASM_WEAKEN_LABEL): Removed.

From-SVN: r19491

gcc/ChangeLog
gcc/config/mips/elf.h
gcc/config/mips/elf64.h
gcc/config/mips/r3900.h

index e6a9b70e252dc8df96296fe2f8815dddbc3e01a0..4cb493cd55c6773efd433c693ee674b21dfa790c 100644 (file)
@@ -1,3 +1,11 @@
+Wed Apr 29 15:06:42 1998  Gavin Koch  <gavin@cygnus.com>
+
+       * config/mips/elf.h (ASM_OUTPUT_DEF,ASM_WEAKEN_LABEL,
+       ASM_OUTPUT_WEAK_ALIAS): Define.
+       * config/mips/elf64.h: Same.
+       * config/mips/r3900.h (ASM_OUTPUT_DEF,SUPPORTS_WEAK,
+       ASM_WEAKEN_LABEL): Removed.
+
 Wed Apr 29 10:53:29 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
 
        * calls.c (expand_call): Bump the length limit on the specially
index e0425cf73ac3f065d3937fa4eb1c58dd42d76867..f987de393c17073a0b86b01de3a7881d49f9ce0f 100644 (file)
@@ -70,3 +70,35 @@ do {                                                         \
   else                                                         \
     fprintf (F, "\t.section %s,\"aw\",@progbits\n", (NAME));   \
 } while (0)
+
+#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)                            \
+ do { fputc ( '\t', FILE);                                            \
+      assemble_name (FILE, LABEL1);                                   \
+      fputs ( " = ", FILE);                                           \
+      assemble_name (FILE, LABEL2);                                   \
+      fputc ( '\n', FILE);                                            \
+ } while (0)
+
+/* Note about .weak vs. .weakext
+   The mips native assemblers support .weakext, but not .weak.
+   mips-elf gas supports .weak, but not .weakext.
+   mips-elf gas has been changed to support both .weak and .weakext,
+   but until that support is generally available, the 'if' below
+   should serve. */
+
+#define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,0)
+#define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE) \
+ do {                                          \
+  if (TARGET_GAS)                               \
+      fputs ("\t.weak\t", FILE);               \
+  else                                          \
+      fputs ("\t.weakext\t", FILE);            \
+  assemble_name (FILE, NAME);                  \
+  if (VALUE)                                   \
+    {                                          \
+      fputc (' ', FILE);                       \
+      assemble_name (FILE, VALUE);             \
+    }                                          \
+  fputc ('\n', FILE);                          \
+ } while (0)
+
index 1841150ef3fc7a13ccb9a1448087a7247bb6a444..3673c9ed1873fa0e768bf3b0f034c31855d88422 100644 (file)
@@ -95,3 +95,35 @@ do {                                                         \
   else                                                         \
     fprintf (F, "\t.section %s,\"aw\",@progbits\n", (NAME));   \
 } while (0)
+
+#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)                            \
+ do { fputc ( '\t', FILE);                                            \
+      assemble_name (FILE, LABEL1);                                   \
+      fputs ( " = ", FILE);                                           \
+      assemble_name (FILE, LABEL2);                                   \
+      fputc ( '\n', FILE);                                            \
+ } while (0)
+
+/* Note about .weak vs. .weakext
+   The mips native assemblers support .weakext, but not .weak.
+   mips-elf gas supports .weak, but not .weakext.
+   mips-elf gas has been changed to support both .weak and .weakext,
+   but until that support is generally available, the 'if' below
+   should serve. */
+
+#define ASM_WEAKEN_LABEL(FILE,NAME) ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,0)
+#define ASM_OUTPUT_WEAK_ALIAS(FILE,NAME,VALUE) \
+ do {                                          \
+  if (TARGET_GAS)                               \
+      fputs ("\t.weak\t", FILE);               \
+  else                                          \
+      fputs ("\t.weakext\t", FILE);            \
+  assemble_name (FILE, NAME);                  \
+  if (VALUE)                                   \
+    {                                          \
+      fputc (' ', FILE);                       \
+      assemble_name (FILE, VALUE);             \
+    }                                          \
+  fputc ('\n', FILE);                          \
+ } while (0)
+
index f1a0d21bfb1bbac63d39153aabd3e533beeb99eb..0e95c7d538ebced01324ec028d850b92d11d3ac0 100644 (file)
@@ -69,21 +69,4 @@ Boston, MA 02111-1307, USA.  */
 %{gstabs+:-g} %{gstabs+0:-g0} %{gstabs+1:-g1} %{gstabs+2:-g2} %{gstabs+3:-g3} \
 %{gcoff:-g} %{gcoff0:-g0} %{gcoff1:-g1} %{gcoff2:-g2} %{gcoff3:-g3}"
 
-/* This is how to equate one symbol to another symbol.  The syntax used is
-   `SYM1=SYM2'.  Note that this is different from the way equates are done
-   with most svr4 assemblers, where the syntax is `.set SYM1,SYM2'.  */
-
-#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2)                            \
- do { fprintf ((FILE), "\t");                                         \
-      assemble_name (FILE, LABEL1);                                   \
-      fprintf (FILE, " = ");                                          \
-      assemble_name (FILE, LABEL2);                                   \
-      fprintf (FILE, "\n");                                           \
- } while (0)
-
-#define SUPPORTS_WEAK 1
-#define ASM_WEAKEN_LABEL(FILE,NAME)                                   \
- do { fprintf ((FILE), "\t.weak\t");                                  \
-      assemble_name (FILE, NAME);                                     \
-      fprintf (FILE, "\n");                                           \
- } while (0)
+/* eof */