aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorJason Merrill <merrill@gnu.org>1995-05-16 01:02:59 +0000
committerJason Merrill <merrill@gnu.org>1995-05-16 01:02:59 +0000
commitdaefd78b4ccc28ce52e5c8a7abebe5b6fc903cc3 (patch)
tree9d5f3bb804d2bbfb71d3beebd8c3bc2c6f1f2499 /gcc/config
parent27a2e668fddbb747a6f62e3c2388ca846319ebe5 (diff)
downloadgcc-daefd78b4ccc28ce52e5c8a7abebe5b6fc903cc3.zip
gcc-daefd78b4ccc28ce52e5c8a7abebe5b6fc903cc3.tar.gz
gcc-daefd78b4ccc28ce52e5c8a7abebe5b6fc903cc3.tar.bz2
Update weak symbol support
From-SVN: r9697
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/aoutos.h15
-rw-r--r--gcc/config/i386/freebsd.h7
-rw-r--r--gcc/config/i386/osfrose.h9
-rw-r--r--gcc/config/m88k/m88k.h15
-rw-r--r--gcc/config/netbsd.h9
-rw-r--r--gcc/config/sparc/sunos4.h15
-rw-r--r--gcc/config/svr4.h7
7 files changed, 36 insertions, 41 deletions
diff --git a/gcc/config/aoutos.h b/gcc/config/aoutos.h
index f7bfc90..b398965 100644
--- a/gcc/config/aoutos.h
+++ b/gcc/config/aoutos.h
@@ -85,18 +85,3 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
fputc ('\n', FILE); \
} \
} while (0)
-
-/* If we're using GNU as and ld, we support weak symbols. */
-
-#define HANDLE_PRAGMA_WEAK flag_gnu_linker
-#define WEAK_ASM_OP ".weak"
-#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
- do { if (flag_gnu_linker) \
- { \
- fprintf ((FILE), "\t%s\t", ".set"); \
- assemble_name (FILE, LABEL1); \
- fprintf (FILE, ","); \
- assemble_name (FILE, LABEL2); \
- fprintf (FILE, "\n"); \
- } \
- } while (0)
diff --git a/gcc/config/i386/freebsd.h b/gcc/config/i386/freebsd.h
index 10a486d..102cb94 100644
--- a/gcc/config/i386/freebsd.h
+++ b/gcc/config/i386/freebsd.h
@@ -118,7 +118,12 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define TYPE_ASM_OP ".type"
#define SIZE_ASM_OP ".size"
-#define WEAK_ASM_OP ".weak"
+
+/* This is how we tell the assembler that a symbol is weak. */
+
+#define ASM_WEAKEN_LABEL(FILE,NAME) \
+ do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
+ fputc ('\n', FILE); } while (0)
/* The following macro defines the format used to output the second
operand of the .type assembler directive. Different svr4 assemblers
diff --git a/gcc/config/i386/osfrose.h b/gcc/config/i386/osfrose.h
index fa2040c..159c184 100644
--- a/gcc/config/i386/osfrose.h
+++ b/gcc/config/i386/osfrose.h
@@ -94,7 +94,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Handle #pragma weak and #pragma pack. */
#define HANDLE_SYSV_PRAGMA
-#define HANDLE_PRAGMA_WEAK TARGET_ELF
+#define SUPPORTS_WEAK TARGET_ELF
/* Change default predefines. */
#undef CPP_PREDEFINES
@@ -617,9 +617,14 @@ while (0)
#define TYPE_ASM_OP ".type"
#define SIZE_ASM_OP ".size"
-#define WEAK_ASM_OP ".weak"
#define SET_ASM_OP ".set"
+/* This is how we tell the assembler that a symbol is weak. */
+
+#define ASM_WEAKEN_LABEL(FILE,NAME) \
+ do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
+ fputc ('\n', FILE); } while (0)
+
/* The following macro defines the format used to output the second
operand of the .type assembler directive. Different svr4 assemblers
expect various different forms for this operand. The one given here
diff --git a/gcc/config/m88k/m88k.h b/gcc/config/m88k/m88k.h
index 76a7083..3f84cd6 100644
--- a/gcc/config/m88k/m88k.h
+++ b/gcc/config/m88k/m88k.h
@@ -198,13 +198,13 @@ extern char * reg_names[];
Redefined in sysv4.h, and luna.h. */
#define VERSION_INFO1 "88open OCS/BCS, "
#ifndef VERSION_INFO2
-#define VERSION_INFO2 "$Revision: 1.1.1.2.2.2 $"
+#define VERSION_INFO2 "$Revision: 1.63 $"
#endif
#ifndef VERSION_STRING
#define VERSION_STRING version_string
#ifdef __STDC__
-#define TM_RCS_ID "@(#)" __FILE__ " $Revision: 1.1.1.2.2.2 $ " __DATE__
+#define TM_RCS_ID "@(#)" __FILE__ " $Revision: 1.63 $ " __DATE__
#else
#define TM_RCS_ID "$What: <@(#) m88k.h,v 1.1.1.2.2.2> $"
#endif /* __STDC__ */
@@ -1542,7 +1542,7 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
#define HANDLE_SYSV_PRAGMA
/* Tell when to handle #pragma weak. This is only done for V.4. */
-#define HANDLE_PRAGMA_WEAK TARGET_SVR4
+#define SUPPORTS_WEAK TARGET_SVR4
/* Max number of bytes we can move from memory to memory
in one reasonably fast instruction. */
@@ -1725,7 +1725,6 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
#undef FINI_SECTION_ASM_OP
#undef TYPE_ASM_OP
#undef SIZE_ASM_OP
-#undef WEAK_ASM_OP
#undef SET_ASM_OP
#undef SKIP_ASM_OP
#undef COMMON_ASM_OP
@@ -1776,12 +1775,18 @@ enum reg_class { NO_REGS, AP_REG, XRF_REGS, GENERAL_REGS, AGRF_REGS,
/* These are specific to PIC. */
#define TYPE_ASM_OP "type"
#define SIZE_ASM_OP "size"
-#define WEAK_ASM_OP "weak"
#ifndef AS_BUG_POUND_TYPE /* Faulty assemblers require @ rather than #. */
#undef TYPE_OPERAND_FMT
#define TYPE_OPERAND_FMT "#%s"
#endif
+/* This is how we tell the assembler that a symbol is weak. */
+
+#undef ASM_WEAKEN_LABEL
+#define ASM_WEAKEN_LABEL(FILE,NAME) \
+ do { fputs ("\tweak\t", FILE); assemble_name (FILE, NAME); \
+ fputc ('\n', FILE); } while (0)
+
/* These are specific to version 03.00 assembler syntax. */
#define INTERNAL_ASM_OP "local"
#define VERSION_ASM_OP "version"
diff --git a/gcc/config/netbsd.h b/gcc/config/netbsd.h
index af4f62e..8c0974a 100644
--- a/gcc/config/netbsd.h
+++ b/gcc/config/netbsd.h
@@ -82,10 +82,15 @@
#undef TYPE_ASM_OP
#undef SIZE_ASM_OP
-#undef WEAK_ASM_OP
#define TYPE_ASM_OP ".type"
#define SIZE_ASM_OP ".size"
-#define WEAK_ASM_OP ".weak"
+
+/* This is how we tell the assembler that a symbol is weak. */
+
+#undef ASM_WEAKEN_LABEL
+#define ASM_WEAKEN_LABEL(FILE,NAME) \
+ do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
+ fputc ('\n', FILE); } while (0)
/* The following macro defines the format used to output the second
operand of the .type assembler directive. Different svr4 assemblers
diff --git a/gcc/config/sparc/sunos4.h b/gcc/config/sparc/sunos4.h
index fd108e8..c7bcaad 100644
--- a/gcc/config/sparc/sunos4.h
+++ b/gcc/config/sparc/sunos4.h
@@ -20,18 +20,3 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#define SUNOS4_SHARED_LIBRARIES 1
#include "sparc/sparc.h"
-
-/* If we're using GNU as and ld, we support weak symbols. */
-
-#define HANDLE_PRAGMA_WEAK flag_gnu_linker
-#define WEAK_ASM_OP ".weak"
-#define ASM_OUTPUT_DEF(FILE,LABEL1,LABEL2) \
- do { if (flag_gnu_linker) \
- { \
- fprintf ((FILE), "\t%s\t", ".set"); \
- assemble_name (FILE, LABEL1); \
- fprintf (FILE, ","); \
- assemble_name (FILE, LABEL2); \
- fprintf (FILE, "\n"); \
- } \
- } while (0)
diff --git a/gcc/config/svr4.h b/gcc/config/svr4.h
index 051187b..c1c8692 100644
--- a/gcc/config/svr4.h
+++ b/gcc/config/svr4.h
@@ -648,7 +648,12 @@ dtors_section () \
#define TYPE_ASM_OP ".type"
#define SIZE_ASM_OP ".size"
-#define WEAK_ASM_OP ".weak"
+
+/* This is how we tell the assembler that a symbol is weak. */
+
+#define ASM_WEAKEN_LABEL(FILE,NAME) \
+ do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \
+ fputc ('\n', FILE); } while (0)
/* The following macro defines the format used to output the second
operand of the .type assembler directive. Different svr4 assemblers