This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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
      || info->relocatable
      || info->emitrelocations
      || !is_elf_hash_table (info->hash))
    {
      (*_bfd_error_handler)(_("Warning: gc-sections option ignored"));
      return TRUE;
    }

-- 
Eric Botcazou


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]