diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2015-11-29 23:33:23 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2015-11-29 22:33:23 +0000 |
commit | f1703a2e2b3fefa60a70e08f30be5fb4a7fd8b4f (patch) | |
tree | b119bcfa394a1eeb2b5f120d0165f4e631cf136b /gcc/varasm.c | |
parent | a4850ce9b58d12158248dc7fbe1015646757c813 (diff) | |
download | gcc-f1703a2e2b3fefa60a70e08f30be5fb4a7fd8b4f.zip gcc-f1703a2e2b3fefa60a70e08f30be5fb4a7fd8b4f.tar.gz gcc-f1703a2e2b3fefa60a70e08f30be5fb4a7fd8b4f.tar.bz2 |
cgraph.c (cgraph_node::make_local): No name is unique during incremental linking.
* cgraph.c (cgraph_node::make_local): No name is unique during
incremental linking.
* cgraph.h (can_be_discarded_p): Update comment; also common and
WEAK in named sections can be discarded; when doing incremental
link do not rely on resolution being the final one.
* varasm.c (default_binds_local_p_3, decl_binds_to_current_def_p):
When symbol can be discarded, do not rely on resolution info.
* symtab.c (symtab_node::nonzero_address): Take into account that
symbol can be discarded.
* ipa-visibility.c (update_visibility_by_resolution_info): Handle
definition correctly.
(function_and_variable_visibility): Do not set unique_name when
incrementally linking.
From-SVN: r231050
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc/varasm.c b/gcc/varasm.c index a2adcdb..c4c55e7 100644 --- a/gcc/varasm.c +++ b/gcc/varasm.c @@ -6837,7 +6837,9 @@ default_binds_local_p_3 (const_tree exp, bool shlib, bool weak_dominate, { if (node->in_other_partition) defined_locally = true; - if (resolution_to_local_definition_p (node->resolution)) + if (node->can_be_discarded_p ()) + ; + else if (resolution_to_local_definition_p (node->resolution)) defined_locally = resolved_locally = true; else if (resolution_local_p (node->resolution)) resolved_locally = true; @@ -6930,7 +6932,8 @@ decl_binds_to_current_def_p (const_tree decl) /* When resolution is available, just use it. */ if (symtab_node *node = symtab_node::get (decl)) { - if (node->resolution != LDPR_UNKNOWN) + if (node->resolution != LDPR_UNKNOWN + && !node->can_be_discarded_p ()) return resolution_to_local_definition_p (node->resolution); } |