Index: gcc/gcc/config/rs6000/rs6000.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.c,v retrieving revision 1.70.4.15 diff -c -3 -p -r1.70.4.15 rs6000.c *** rs6000.c 2000/12/18 14:22:02 1.70.4.15 --- rs6000.c 2000/12/23 03:40:00 *************** output_prolog (file, size) *** 4127,4132 **** --- 4127,4137 ---- int sp_reg = 1; int sp_offset = 0; + /* Mark this function as reachable by short branch if not weak */ + rtx sym_ref = XEXP (DECL_RTL (current_function_decl), 0); + if (!DECL_WEAK (current_function_decl)) + SYMBOL_REF_FLAG (sym_ref) = 1; + if (TARGET_32BIT) { store_reg = "\t{st|stw} %s,%d(%s)\n"; *************** rs6000_encode_section_info (decl) *** 5889,5897 **** 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)) ! SYMBOL_REF_FLAG (sym_ref) = 1; if (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT) { --- 5894,5901 ---- if (TREE_CODE (decl) == FUNCTION_DECL) { rtx sym_ref = XEXP (DECL_RTL (decl), 0); ! if (!TREE_PUBLIC (decl) && !DECL_WEAK (decl)) ! SYMBOL_REF_FLAG (sym_ref) = 1; if (DEFAULT_ABI == ABI_AIX || DEFAULT_ABI == ABI_NT) { Index: gcc/gcc/config/rs6000/rs6000.h =================================================================== RCS file: /cvs/gcc/gcc/gcc/config/rs6000/rs6000.h,v retrieving revision 1.49.4.6 diff -c -3 -p -r1.49.4.6 rs6000.h *** rs6000.h 2000/03/22 18:54:05 1.49.4.6 --- rs6000.h 2000/12/23 03:40:11 *************** extern int rs6000_trunc_used; *** 2538,2544 **** #define ENCODE_SECTION_INFO(DECL) \ if (TREE_CODE (DECL) == FUNCTION_DECL \ ! && (TREE_ASM_WRITTEN (DECL) || ! TREE_PUBLIC (DECL)) \ && !DECL_WEAK (DECL)) \ SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1; --- 2538,2544 ---- #define ENCODE_SECTION_INFO(DECL) \ if (TREE_CODE (DECL) == FUNCTION_DECL \ ! && !TREE_PUBLIC (DECL) \ && !DECL_WEAK (DECL)) \ SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1;