https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67548
--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> --- (In reply to Jan Hubicka from comment #5) > > None of them is applicable to a weakdef with "ld -r". > Yep, GCC simply assumes that incremental linking is not going to happen and > it makes strong assumptions > about visibility in static&PIC binaries. > To support incremental linking we need a way to pass this information to > GCC. Either by extra codes or > by informing the plugin that linking is incremental. > See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64860 > > Honza Linker passes this /* The type of output file being generated by the linker. */ enum ld_plugin_output_file_type { LDPO_REL, LDPO_EXEC, LDPO_DYN, LDPO_PIE }; to GCC plug-in. But this information is never used by GCC plug-in.