This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] More aggressive --gc-sections
> Have you tested this when building shared libs?
Yes. GtkAda for example.
> I suspect that elf_gc_mark_dynamic_ref_symbol won't do the right thing for
> shared libs, specifically, that ELF_LINK_HASH_REF_DYNAMIC won't always be
> set. You will probably want to disable gc-sections for shared libs.
Is that not already the case?
if (!get_elf_backend_data (abfd)->can_gc_sections
|| !is_elf_hash_table (info->hash))
(*_bfd_error_handler)(_("Warning: gc-sections option ignored"));