aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/elflink.c')
-rw-r--r--bfd/elflink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elflink.c b/bfd/elflink.c
index 1591682..2f40eb0 100644
--- a/bfd/elflink.c
+++ b/bfd/elflink.c
@@ -13037,7 +13037,8 @@ _bfd_elf_gc_keep (struct bfd_link_info *info)
if (h != NULL
&& (h->root.type == bfd_link_hash_defined
|| h->root.type == bfd_link_hash_defweak)
- && !bfd_is_abs_section (h->root.u.def.section))
+ && !bfd_is_abs_section (h->root.u.def.section)
+ && !bfd_is_und_section (h->root.u.def.section))
h->root.u.def.section->flags |= SEC_KEEP;
}
}