Commit b629ba0c by Alan Modra Committed by Alan Modra

rs6000.c (rs6000_elf_encode_section_info): Use targetm.binds_local_p to set SYMBOL_REF_FLAG.

	* 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
parent 2e485129
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> 2002-09-10 Theodore A. Roth <troth@verinet.com>
* gcc/config/avr/avr.h: Set default options for C++ for avr. * gcc/config/avr/avr.h: Set default options for C++ for avr.
......
...@@ -12424,8 +12424,7 @@ rs6000_elf_encode_section_info (decl, first) ...@@ -12424,8 +12424,7 @@ rs6000_elf_encode_section_info (decl, first)
if (TREE_CODE (decl) == FUNCTION_DECL) if (TREE_CODE (decl) == FUNCTION_DECL)
{ {
rtx sym_ref = XEXP (DECL_RTL (decl), 0); rtx sym_ref = XEXP (DECL_RTL (decl), 0);
if ((TREE_ASM_WRITTEN (decl) || ! TREE_PUBLIC (decl)) if ((*targetm.binds_local_p) (decl))
&& ! DECL_WEAK (decl))
SYMBOL_REF_FLAG (sym_ref) = 1; SYMBOL_REF_FLAG (sym_ref) = 1;
if (DEFAULT_ABI == ABI_AIX) if (DEFAULT_ABI == ABI_AIX)
...@@ -13121,8 +13120,7 @@ rs6000_xcoff_encode_section_info (decl, first) ...@@ -13121,8 +13120,7 @@ rs6000_xcoff_encode_section_info (decl, first)
int first ATTRIBUTE_UNUSED; int first ATTRIBUTE_UNUSED;
{ {
if (TREE_CODE (decl) == FUNCTION_DECL if (TREE_CODE (decl) == FUNCTION_DECL
&& (TREE_ASM_WRITTEN (decl) || ! TREE_PUBLIC (decl)) && (*targetm.binds_local_p) (decl))
&& ! DECL_WEAK (decl))
SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1; SYMBOL_REF_FLAG (XEXP (DECL_RTL (decl), 0)) = 1;
} }
......
...@@ -266,7 +266,7 @@ toc_section () \ ...@@ -266,7 +266,7 @@ toc_section () \
#define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \ #define ASM_DECLARE_FUNCTION_NAME(FILE,NAME,DECL) \
{ rtx sym_ref = XEXP (DECL_RTL (DECL), 0); \ { rtx sym_ref = XEXP (DECL_RTL (DECL), 0); \
if (!DECL_WEAK (DECL)) \ if ((*targetm.binds_local_p) (DECL)) \
SYMBOL_REF_FLAG (sym_ref) = 1; \ SYMBOL_REF_FLAG (sym_ref) = 1; \
if (TREE_PUBLIC (DECL)) \ if (TREE_PUBLIC (DECL)) \
{ \ { \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment