https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126452

--- Comment #4 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #3)
> Does GNU ld even print a warning of that form?
> 
> If I give a bad option I get:
> 
> ld: unrecognized option '--gd-section'

bool
bfd_elf_gc_sections (bfd *obfd, struct bfd_link_info *info)
{
...
  if (!obed->can_gc_sections
      || !is_elf_hash_table (info->hash))
    {
      _bfd_error_handler(_("warning: gc-sections option ignored"));
      return true;
    }

The problem with ld --help is we run into issues like PR121457 if your binutils
was built with --enable-targets=all.

Reply via email to