aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf-bfd.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-02-24 18:01:16 +1030
committerAlan Modra <amodra@gmail.com>2021-02-25 14:19:24 +1030
commitbbaddd4bbeba65200ee805d87c2e3a845842e3eb (patch)
tree4658bf3f761fd1feaf3b5eeb88bd1488b3ebc419 /bfd/elf-bfd.h
parent39b07596938e4c2a7251d77ea01981d475747599 (diff)
downloadgdb-bbaddd4bbeba65200ee805d87c2e3a845842e3eb.zip
gdb-bbaddd4bbeba65200ee805d87c2e3a845842e3eb.tar.gz
gdb-bbaddd4bbeba65200ee805d87c2e3a845842e3eb.tar.bz2
PR27441, inconsistency in weak definitions
This makes IR objects use the same logic as normal objects with respect to what sort of ref/def makes an as-needed library needed. Testing the binding of the definition is just plain wrong. What matters is the binding of the reference. PR 27441 * elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak. * elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and use when deciding an as-needed library should be loaded instead of using the binding of the library definition.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r--bfd/elf-bfd.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 4b79ee8..dd66d98 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -184,6 +184,8 @@ struct elf_link_hash_entry
/* Symbol has a non-weak reference from a non-shared object (other than
the object in which it is defined). */
unsigned int ref_regular_nonweak : 1;
+ /* Symbol has a non-weak reference from a LTO IR object file. */
+ unsigned int ref_ir_nonweak : 1;
/* Dynamic symbol has been adjustd. */
unsigned int dynamic_adjusted : 1;
/* Symbol needs a copy reloc. */