diff options
author | Daniel Jacobowitz <drow@false.org> | 1999-08-05 07:17:35 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-08-05 01:17:35 -0600 |
commit | 8f1b829ed295b4b834cd8fde9f3aa84932b86942 (patch) | |
tree | cab50d4a841c3716129a7bbe0fa64f03dd0fc598 /gcc | |
parent | 906fb125a14fba63516ed295b779546f1ea6e631 (diff) | |
download | gcc-8f1b829ed295b4b834cd8fde9f3aa84932b86942.zip gcc-8f1b829ed295b4b834cd8fde9f3aa84932b86942.tar.gz gcc-8f1b829ed295b4b834cd8fde9f3aa84932b86942.tar.bz2 |
rs6000.c (current_file_function_operand): Return zero for weak functions.
* rs6000.c (current_file_function_operand): Return zero for
weak functions.
(rs6000_encode_section_info): Do not set SYMBOL_REF_FLAG for
weak symbols.
* rs6000.h (ENCODE_SECTION_NIFO): Do not set SYMBOL_REF_FLAG
for weak symbols.
From-SVN: r28527
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 8 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.h | 5 |
3 files changed, 17 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7b37f79..94bd0c9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +Thu Aug 5 01:14:13 1999 Daniel Jacobowitz <drow@false.org> + + * rs6000.c (current_file_function_operand): Return zero for + weak functions. + (rs6000_encode_section_info): Do not set SYMBOL_REF_FLAG for + weak symbols. + * rs6000.h (ENCODE_SECTION_NIFO): Do not set SYMBOL_REF_FLAG + for weak symbols. + Thu Aug 5 00:56:30 1999 Geoffrey Keating <geoffk@cygnus.com> * rs6000.c (rs6000_stack_info): For ABI_V4/ABI_SOLARIS -fpic, always diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 2f49b37..b3b6fa2 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -1117,7 +1117,7 @@ call_operand (op, mode) /* Return 1 if the operand is a SYMBOL_REF for a function known to be in - this file. */ + this file and the function is not weakly defined. */ int current_file_function_operand (op, mode) @@ -1126,7 +1126,8 @@ current_file_function_operand (op, mode) { return (GET_CODE (op) == SYMBOL_REF && (SYMBOL_REF_FLAG (op) - || op == XEXP (DECL_RTL (current_function_decl), 0))); + || (op == XEXP (DECL_RTL (current_function_decl), 0) + && !DECL_WEAK (current_function_decl)))); } @@ -5900,7 +5901,8 @@ rs6000_encode_section_info (decl) if (TREE_CODE (decl) == FUNCTION_DECL) { rtx sym_ref = XEXP (DECL_RTL (decl), 0); - if (TREE_ASM_WRITTEN (decl) || ! TREE_PUBLIC (decl)) + if ((TREE_ASM_WRITTEN (decl) || ! TREE_PUBLIC (decl)) + && !DECL_WEAK (decl)) SYMBOL_REF_FLAG (sym_ref) = 1; if (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT) diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index d5eb6f6..3a86ec1 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -2555,11 +2555,12 @@ extern int rs6000_trunc_used; /* If we are referencing a function that is static or is known to be in this file, make the SYMBOL_REF special. We can use this to indicate that we can branch to this function without emitting a no-op after the - call. */ + call. Do not set this flag if the function is weakly defined. */ #define ENCODE_SECTION_INFO(DECL) \ if (TREE_CODE (DECL) == FUNCTION_DECL \ - && (TREE_ASM_WRITTEN (DECL) || ! TREE_PUBLIC (DECL))) \ + && (TREE_ASM_WRITTEN (DECL) || ! TREE_PUBLIC (DECL)) \ + && !DECL_WEAK (DECL)) \ SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; /* Indicate that jump tables go in the text section. */ |