rs6000.c (rs6000_elf_encode_section_info): Use targetm.binds_local_p to set SYMBOL_RE...
authorAlan Modra <amodra@bigpond.net.au>
Sat, 14 Sep 2002 08:07:58 +0000 (08:07 +0000)
committerAlan Modra <amodra@gcc.gnu.org>
Sat, 14 Sep 2002 08:07:58 +0000 (17:37 +0930)
* config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Use
targetm.binds_local_p to set SYMBOL_REF_FLAG.
(rs6000_xcoff_encode_section_info): Likewise.
* config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Likewise.

From-SVN: r57135

gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/config/rs6000/xcoff.h

index f967960e1191d92fa256661e13fd8acd46de9a46..a89145c02902afac5ae36433f4d4ad7160ca7345 100644 (file)
@@ -1,3 +1,10 @@
+2002-09-14  Alan Modra  <amodra@bigpond.net.au>
+
+       * config/rs6000/rs6000.c (rs6000_elf_encode_section_info): Use
+       targetm.binds_local_p to set SYMBOL_REF_FLAG.
+       (rs6000_xcoff_encode_section_info): Likewise.
+       * config/rs6000/xcoff.h (ASM_DECLARE_FUNCTION_NAME): Likewise.
+
 2002-09-10  Theodore A. Roth  <troth@verinet.com>
 
        * gcc/config/avr/avr.h: Set default options for C++ for avr.
index b4fc13df386be8fec4b5af3bd8f386a651cd6151..f7235401822d9d55692a270c9df9f19f07572270 100644 (file)
@@ -12424,8 +12424,7 @@ rs6000_elf_encode_section_info (decl, first)
   if (TREE_CODE (decl) == FUNCTION_DECL)
     {
       rtx sym_ref = XEXP (DECL_RTL (decl), 0);
-      if ((TREE_ASM_WRITTEN (decl) || ! TREE_PUBLIC (decl))
-          && ! DECL_WEAK (decl))
+      if ((*targetm.binds_local_p) (decl))
        SYMBOL_REF_FLAG (sym_ref) = 1;
 
       if (DEFAULT_ABI == ABI_AIX)
@@ -13121,8 +13120,7 @@ rs6000_xcoff_encode_section_info (decl, first)
      int first ATTRIBUTE_UNUSED;
 {
   if (TREE_CODE (decl) == FUNCTION_DECL
-      && (TREE_ASM_WRITTEN (decl) || ! TREE_PUBLIC (decl))
-      && ! DECL_WEAK (decl))
+      && (*targetm.binds_local_p) (decl))
     SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;
 }
 
index b83f678b9f85c62daf8dbdfe1bf8292c52c2b983..820e71b6f4808c8bb63deb97220bccd5f243a4af 100644 (file)
@@ -266,7 +266,7 @@ toc_section ()                                              \
 
 #define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL)              \
 { rtx sym_ref = XEXP (DECL_RTL (DECL), 0);                     \
-  if (!DECL_WEAK (DECL))                                       \
+  if ((*targetm.binds_local_p) (DECL))                         \
     SYMBOL_REF_FLAG (sym_ref) = 1;                             \
   if (TREE_PUBLIC (DECL))                                      \
     {                                                          \