From 4070765b1a1640ff8f43483cd9ee06727f658dfe Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 16 May 2017 07:56:41 +0930 Subject: non_ir_ref_dynamic dynamic_ref_after_ir_def is a little odd compared to other symbol flags in that as the name suggests, it is set only for certain references after a definition. It turns out that setting a flag for any non-ir reference from a dynamic object can be used to solve the problem for which this flag was invented, which I think is a cleaner. This patch does that, and sets non_ir_ref only for regular object references. include/ * bfdlink.h (struct bfd_link_hash_entry): Update non_ir_ref comment. Rename dynamic_ref_after_ir_def to non_ir_ref_dynamic. ld/ * plugin.c (is_visible_from_outside): Use non_ir_ref_dynamic. (plugin_notice): Set non_ir_ref for references from regular objects, non_ir_ref_dynamic for references from dynamic objects. bfd/ * elf64-ppc.c (add_symbol_adjust): Transfer non_ir_ref_dynamic. * elflink.c (elf_link_add_object_symbols): Update to use non_ir_ref_dynamic. (elf_link_input_bfd): Test non_ir_ref_dynamic in addition to non_ir_ref. * linker.c (_bfd_generic_link_add_one_symbol): Likewise. --- include/ChangeLog | 5 +++++ include/bfdlink.h | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/ChangeLog b/include/ChangeLog index 67bf02f..8425760 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2017-05-16 Alan Modra + + * bfdlink.h (struct bfd_link_hash_entry): Update non_ir_ref + comment. Rename dynamic_ref_after_ir_def to non_ir_ref_dynamic. + 2017-05-15 Maciej W. Rozycki Matthew Fortune diff --git a/include/bfdlink.h b/include/bfdlink.h index cb4bad9..41f5338 100644 --- a/include/bfdlink.h +++ b/include/bfdlink.h @@ -100,13 +100,13 @@ struct bfd_link_hash_entry /* Type of this entry. */ ENUM_BITFIELD (bfd_link_hash_type) type : 8; - /* Symbol is referenced in a normal object file, as distict from a LTO - IR object file. */ + /* Symbol is referenced in a normal regular object file, + as distinct from a LTO IR object file. */ unsigned int non_ir_ref : 1; - /* Symbol is referenced in a dynamic object after it has been defined - in an IR object. */ - unsigned int dynamic_ref_after_ir_def : 1; + /* Symbol is referenced in a normal dynamic object file, + as distinct from a LTO IR object file. */ + unsigned int non_ir_ref_dynamic : 1; /* Symbol is a built-in define. These will be overridden by PROVIDE in a linker script. */ -- cgit v1.1