diff options
author | Alan Modra <amodra@gmail.com> | 2020-07-20 13:32:34 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-07-20 22:21:11 +0930 |
commit | 2f5541f384babda4aef3d6c8011a6d15af78e0a3 (patch) | |
tree | 77de27fb62718a1cdcff15552aaee892704d6c7b /bfd | |
parent | b243ba58e833dbb03f3746c0146f1450822c5d05 (diff) | |
download | gdb-2f5541f384babda4aef3d6c8011a6d15af78e0a3.zip gdb-2f5541f384babda4aef3d6c8011a6d15af78e0a3.tar.gz gdb-2f5541f384babda4aef3d6c8011a6d15af78e0a3.tar.bz2 |
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.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/elflink.c | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 43326b5..d6a1d87 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2020-07-20 Alan Modra <amodra@gmail.com> + + * elflink.c (_bfd_elf_gc_keep): Use bfd_is_const_section. + 2020-07-19 Alan Modra <amodra@gmail.com> * elf64-ppc.c (struct ppc_link_hash_table): Add has_power10_relocs. diff --git a/bfd/elflink.c b/bfd/elflink.c index 6978df5..286fc11 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -13779,8 +13779,7 @@ _bfd_elf_gc_keep (struct bfd_link_info *info) if (h != NULL && (h->root.type == bfd_link_hash_defined || h->root.type == bfd_link_hash_defweak) - && !bfd_is_abs_section (h->root.u.def.section) - && !bfd_is_und_section (h->root.u.def.section)) + && !bfd_is_const_section (h->root.u.def.section)) h->root.u.def.section->flags |= SEC_KEEP; } } |