summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2017-10-06 17:03:36 -0700
committerH.J. Lu <hjl.tools@gmail.com>2017-10-11 13:56:42 -0700
commit0ebbcfa95574d0932878e682bd40519a9fefbe2c (patch)
tree7becd031903d303d54b68d3aa29193138e28ecf9
parent93445c1d3fb53145ee82ff873cc8c83192b07240 (diff)
downloadbinutils-gdb-0ebbcfa95574d0932878e682bd40519a9fefbe2c.tar.gz
ppc: Update UNDEFWEAK_NO_DYNAMIC_RELOC
UNDEFWEAK_NO_DYNAMIC_RELOC is the same as UNDEFINED_WEAK_RESOLVED_TO_ZERO. PR ld/22269 * elf32-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Defined as UNDEFINED_WEAK_RESOLVED_TO_ZERO. * elf64-ppc.c (UNDEFWEAK_NO_DYNAMIC_RELOC): Likewise.
-rw-r--r--bfd/elf32-ppc.c4
-rw-r--r--bfd/elf64-ppc.c4
2 files changed, 2 insertions, 6 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index 1a22648e954..380e8e5dcaa 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -3181,9 +3181,7 @@ must_be_dyn_reloc (struct bfd_link_info *info,
/* Whether an undefined weak symbol should resolve to its link-time
value, even in PIC or PIE objects. */
#define UNDEFWEAK_NO_DYNAMIC_RELOC(INFO, H) \
- ((H)->root.type == bfd_link_hash_undefweak \
- && (ELF_ST_VISIBILITY ((H)->other) != STV_DEFAULT \
- || (INFO)->dynamic_undefined_weak == 0))
+ UNDEFINED_WEAK_RESOLVED_TO_ZERO ((INFO), (H))
/* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
copying dynamic variables from a shared lib into an app's dynbss
diff --git a/bfd/elf64-ppc.c b/bfd/elf64-ppc.c
index 1d9be1740fb..9ba338ffb40 100644
--- a/bfd/elf64-ppc.c
+++ b/bfd/elf64-ppc.c
@@ -3837,9 +3837,7 @@ must_be_dyn_reloc (struct bfd_link_info *info,
/* Whether an undefined weak symbol should resolve to its link-time
value, even in PIC or PIE objects. */
#define UNDEFWEAK_NO_DYNAMIC_RELOC(INFO, H) \
- ((H)->root.type == bfd_link_hash_undefweak \
- && (ELF_ST_VISIBILITY ((H)->other) != STV_DEFAULT \
- || (INFO)->dynamic_undefined_weak == 0))
+ UNDEFINED_WEAK_RESOLVED_TO_ZERO ((INFO), (H))
/* If ELIMINATE_COPY_RELOCS is non-zero, the linker will try to avoid
copying dynamic variables from a shared lib into an app's dynbss