This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
try_copy_symbol_type node_class check
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Sat, 3 Dec 2016 21:16:24 +1030
- Subject: try_copy_symbol_type node_class check
- Authentication-results: sourceware.org; auth=none
* ldexp.c (try_copy_symbol_type): Remove unnecessary check.
diff --git a/ld/ldexp.c b/ld/ldexp.c
index cb5e093..c962c5e 100644
--- a/ld/ldexp.c
+++ b/ld/ldexp.c
@@ -990,16 +990,12 @@ is_align_conditional (const etree_type *tree)
static void
try_copy_symbol_type (struct bfd_link_hash_entry *h, etree_type *src)
{
- if (src->type.node_class == etree_name)
- {
- struct bfd_link_hash_entry *hsrc;
+ struct bfd_link_hash_entry *hsrc;
- hsrc = bfd_link_hash_lookup (link_info.hash, src->name.name,
- FALSE, FALSE, TRUE);
- if (hsrc)
- bfd_copy_link_hash_symbol_type (link_info.output_bfd, h,
- hsrc);
- }
+ hsrc = bfd_link_hash_lookup (link_info.hash, src->name.name,
+ FALSE, FALSE, TRUE);
+ if (hsrc != NULL)
+ bfd_copy_link_hash_symbol_type (link_info.output_bfd, h, hsrc);
}
static void
--
Alan Modra
Australia Development Lab, IBM