+2019-05-27 Alan Modra <amodra@gmail.com>
+
+ PR 24596
+ * linker.c (_bfd_generic_link_output_symbols): Heed BSF_KEEP.
+
2019-05-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
* elfnn-aarch64.c (elfNN_aarch64_merge_symbol_attribute): New function.
}
}
- /* This switch is straight from the old code in
- write_file_locals in ldsym.c. */
- if (info->strip == strip_all
- || (info->strip == strip_some
- && bfd_hash_lookup (info->keep_hash, bfd_asymbol_name (sym),
- FALSE, FALSE) == NULL))
+ if ((sym->flags & BSF_KEEP) == 0
+ && (info->strip == strip_all
+ || (info->strip == strip_some
+ && bfd_hash_lookup (info->keep_hash, bfd_asymbol_name (sym),
+ FALSE, FALSE) == NULL)))
output = FALSE;
else if ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_GNU_UNIQUE)) != 0)
{
else
output = FALSE;
}
+ else if ((sym->flags & BSF_KEEP) != 0)
+ output = TRUE;
else if (bfd_is_ind_section (sym->section))
output = FALSE;
else if ((sym->flags & BSF_DEBUGGING) != 0)
+2019-05-27 Alan Modra <amodra@gmail.com>
+
+ PR 24596
+ * emultempl/genelf.em (gld${EMULATION_NAME}_after_open): Set
+ BFS_KEEP on group signature symbol.
+
2019-04-24 Szabolcs Nagy <szabolcs.nagy@arm.com>
* testsuite/ld-aarch64/aarch64-elf.exp: Add new tests.
if ((sec->flags & (SEC_GROUP | SEC_LINKER_CREATED)) == SEC_GROUP)
{
struct bfd_elf_section_data *sec_data = elf_section_data (sec);
- elf_group_id (sec) = syms[sec_data->this_hdr.sh_info - 1];
+ struct bfd_symbol *sym = syms[sec_data->this_hdr.sh_info - 1];
+ elf_group_id (sec) = sym;
+ sym->flags |= BSF_KEEP;
}
}