re PR lto/67548 (LTO drops weak binding with "ld -r")
authorJan Hubicka <jh@suse.cz>
Wed, 25 Nov 2015 23:05:07 +0000 (00:05 +0100)
committerJan Hubicka <hubicka@gcc.gnu.org>
Wed, 25 Nov 2015 23:05:07 +0000 (23:05 +0000)
commit1ff9ed6fb282ab8a6f1b2aa1655b577cdc2f0e41
tree695e737710e979a37c3a6c8eac41f4786c766cad
parentc9d82fb023ac0bfb69a3835491ddb47268bef09b
re PR lto/67548 (LTO drops weak binding with "ld -r")

PR lto/67548
* lto-plugin.c (linker_output, linker_output_set): New statics.
(all_symbols_read_handler): Add -flinker-output option.
(onload): Record linker_output info.

* ipa-visibility.c (cgraph_externally_visible_p,
varpool_node::externally_visible_p): When doing incremental linking,
hidden symbols may be still used later.
(update_visibility_by_resolution_info): Do not drop weak during
incremental link.
(function_and_variable_visibility): Fix formating.
* flag-types.h (lto_linker_output): Declare.
* common.opt 9flag_incremental_link): New flag.

* lto-lang.c (lto_post_options): Process flag_lto_linker_output.
* lang.opt (lto_linker_output): New enum.
(flinker_output): New flag.

From-SVN: r230915
gcc/ChangeLog
gcc/common.opt
gcc/flag-types.h
gcc/ipa-visibility.c
gcc/lto/ChangeLog
gcc/lto/lang.opt
gcc/lto/lto-lang.c
lto-plugin/ChangeLog
lto-plugin/lto-plugin.c