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/lto | |
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/lto')
-rw-r--r-- | gcc/lto/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/lto/lto-common.c | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog index 9f974afb123..d0b1dba740e 100644 --- a/gcc/lto/ChangeLog +++ b/gcc/lto/ChangeLog @@ -1,3 +1,9 @@ +2019-12-19 Jan Hubicka <hubicka@ucw.cz> + Xi Ruoyao <xry111@mengyan1223.wang> + + * lto-common.c (read_cgraph_and_symbols): Work around binutils + PR25424 + 2019-12-07 Jan Hubicka <hubicka@ucw.cz> * lto-partition.c (lto_balanced_map): Fix printing of tp_first_run. diff --git a/gcc/lto/lto-common.c b/gcc/lto/lto-common.c index 76a9d9383d5..ee07730a27d 100644 --- a/gcc/lto/lto-common.c +++ b/gcc/lto/lto-common.c @@ -2818,6 +2818,11 @@ read_cgraph_and_symbols (unsigned nfiles, const char **fnames) IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (snode->decl))); } + /* Symbol versions are always used externally, but linker does not + report that correctly. + This is binutils PR25924. */ + else if (snode->symver && *res == LDPR_PREVAILING_DEF_IRONLY) + snode->resolution = LDPR_PREVAILING_DEF_IRONLY_EXP; else snode->resolution = *res; } |