diff options
Diffstat (limited to 'gcc/varasm.c')
-rwxr-xr-x | gcc/varasm.c | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index d8b62b8..00273bc 100755 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -4180,53 +4180,3 @@ assemble_alias (decl, target) #endif #endif } - -/* This determines whether or not we support link-once semantics. */ -#ifndef SUPPORTS_ONE_ONLY -#ifdef MAKE_DECL_ONE_ONLY -#define SUPPORTS_ONE_ONLY 1 -#else -#define SUPPORTS_ONE_ONLY 0 -#endif -#endif - -/* Returns 1 if the target configuration supports defining public symbols - so that one of them will be chosen at link time instead of generating a - multiply-defined symbol error, whether through the use of weak symbols or - a target-specific mechanism for having duplicates discarded. */ - -int -supports_one_only () -{ - if (SUPPORTS_ONE_ONLY) - return 1; - return SUPPORTS_WEAK; -} - -/* Set up DECL as a public symbol that can be defined in multiple - translation units without generating a linker error. */ - -void -make_decl_one_only (decl) - tree decl; -{ - if (TREE_CODE (decl) != VAR_DECL && TREE_CODE (decl) != FUNCTION_DECL) - abort (); - - TREE_PUBLIC (decl) = 1; - - if (TREE_CODE (decl) == VAR_DECL - && (DECL_INITIAL (decl) == 0 || DECL_INITIAL (decl) == error_mark_node)) - DECL_COMMON (decl) = 1; - else if (SUPPORTS_ONE_ONLY) - { -#ifdef MAKE_DECL_ONE_ONLY - MAKE_DECL_ONE_ONLY (decl); -#endif - DECL_ONE_ONLY (decl) = 1; - } - else if (SUPPORTS_WEAK) - DECL_WEAK (decl) = 1; - else - abort (); -} |