diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2019-12-19 11:03:48 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2019-12-19 10:03:48 +0000 |
commit | 40ebe1fc2f136a454b0d5efa119bb516ad767c91 (patch) | |
tree | 302cab4062b9e251794530c40e2009eb19eb7509 /gcc/cgraph.c | |
parent | 44fca83228acc96c19c51e52b5c0448e09329170 (diff) |
Fix symver attribute with LTO
* cgraph.c (cgraph_node_cannot_be_local_p_1): Prevent targets of
symver attributes to be localized.
* ipa-visibility.c (cgraph_externally_visible_p,
varpool_node::externally_visible_p): Likewise.
* symtab.c (symtab_node::verify_base): Check visibility of symbol
versions.
* lto-common.c (read_cgraph_and_symbols): Work around binutils
PR25424
Co-Authored-By: Xi Ruoyao <xry111@mengyan1223.wang>
From-SVN: r279566
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r-- | gcc/cgraph.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c index ba5f2767e4b..5ba33a5a0cc 100644 --- a/gcc/cgraph.c +++ b/gcc/cgraph.c @@ -2226,6 +2226,9 @@ cgraph_node_cannot_be_local_p_1 (cgraph_node *node, void *) { return !(!node->force_output && !node->ifunc_resolver + /* Limitation of gas requires us to output targets of symver aliases + as global symbols. This is binutils PR 25295. */ + && !node->symver && ((DECL_COMDAT (node->decl) && !node->forced_by_abi && !node->used_from_object_file_p () |