diff options
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r-- | bfd/elflink.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c index a76e8e3..666399b 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -6290,8 +6290,8 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) continue; /* In the pre-LTO-plugin pass we must not mistakenly - include this archive member if an earlier BFD - defined this symbol. */ + include this archive member if an earlier shared + library defined this symbol. */ struct elf_link_hash_table *htab = elf_hash_table (info); if (htab->first_hash) { @@ -6299,7 +6299,9 @@ elf_link_add_archive_symbols (bfd *abfd, struct bfd_link_info *info) = ((struct elf_link_first_hash_entry *) bfd_hash_lookup (htab->first_hash, symdef->name, false, false)); - if (e && e->abfd != abfd) + if (e + && (e->abfd->flags & DYNAMIC) != 0 + && e->abfd != abfd) continue; } } @@ -12230,9 +12232,9 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) break; case SEC_INFO_TYPE_SFRAME: { - /* Merge .sframe sections into the ctf frame encoder - context of the output_bfd's section. The final .sframe - output section will be written out later. */ + /* Merge SFrame section into the SFrame encoder context of the + output_bfd's section. The final .sframe output section will + be written out later. */ if (!_bfd_elf_merge_section_sframe (output_bfd, flinfo->info, o, contents)) return false; @@ -14056,7 +14058,7 @@ _bfd_elf_gc_mark_rsec (struct bfd_link_info *info, asection *sec, h = get_ext_sym_hash_from_cookie (cookie, r_symndx); if (h == NULL) { - /* A corrup tinput file can lead to a situation where the index + /* A corrupt input file can lead to a situation where the index does not reference either a local or an external symbol. */ if (r_symndx >= cookie->locsymcount) return NULL; @@ -14408,7 +14410,8 @@ elf_gc_sweep (bfd *abfd, struct bfd_link_info *info) if (o->flags & SEC_GROUP) { asection *first = elf_next_in_group (o); - o->gc_mark = first->gc_mark; + if (first != NULL) + o->gc_mark = first->gc_mark; } if (o->gc_mark) |