PR26265, Spurious 'gc-sections requires ... when --init or --fini
authorAlan Modra <amodra@gmail.com>
Mon, 20 Jul 2020 04:02:34 +0000 (13:32 +0930)
committerAlan Modra <amodra@gmail.com>
Mon, 20 Jul 2020 12:51:11 +0000 (22:21 +0930)
commit2f5541f384babda4aef3d6c8011a6d15af78e0a3
tree77de27fb62718a1cdcff15552aaee892704d6c7b
parentb243ba58e833dbb03f3746c0146f1450822c5d05
PR26265, Spurious 'gc-sections requires ... when --init or --fini

bfd/
* elflink.c (_bfd_elf_gc_keep): Use bfd_is_const_section.
ld/
PR 26265
* ldlang.c (undef_from_cmdline): Delete.
(ldlang_add_undef): Mark "cmdline" param unused.
(lang_end): Traverse gc_sym_list to determine whether a symbol root
has been specified.  Update error message.
* testsuite/ld-gc/noent.d: Adjust for changed error message.
bfd/ChangeLog
bfd/elflink.c
ld/ChangeLog
ld/ldlang.c
ld/testsuite/ld-gc/noent.d