aboutsummaryrefslogtreecommitdiff
path: root/bfd/elflink.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-12-23 11:53:59 +0000
committerAlan Modra <amodra@gmail.com>2002-12-23 11:53:59 +0000
commit7582835273b72e5705606f9c5e7c781d8155ccba (patch)
treeb725cdc3bb1786ff6e79a21fc7ca06a80eecafc8 /bfd/elflink.h
parentc6b640180c63d038175669ced92ecd9b6bb1a6b4 (diff)
downloadgdb-7582835273b72e5705606f9c5e7c781d8155ccba.zip
gdb-7582835273b72e5705606f9c5e7c781d8155ccba.tar.gz
gdb-7582835273b72e5705606f9c5e7c781d8155ccba.tar.bz2
* elflink.h (elf_link_output_extsym): Heed strip_discarded.
Diffstat (limited to 'bfd/elflink.h')
-rw-r--r--bfd/elflink.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/bfd/elflink.h b/bfd/elflink.h
index ac3cd11..060b129 100644
--- a/bfd/elflink.h
+++ b/bfd/elflink.h
@@ -6123,11 +6123,16 @@ elf_link_output_extsym (h, data)
&& (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
&& (h->elf_link_hash_flags & ELF_LINK_HASH_REF_REGULAR) == 0)
strip = TRUE;
- else if (finfo->info->strip == strip_all
- || (finfo->info->strip == strip_some
- && bfd_hash_lookup (finfo->info->keep_hash,
- h->root.root.string,
- FALSE, FALSE) == NULL))
+ else if (finfo->info->strip == strip_all)
+ strip = TRUE;
+ else if (finfo->info->strip == strip_some
+ && bfd_hash_lookup (finfo->info->keep_hash,
+ h->root.root.string, FALSE, FALSE) == NULL)
+ strip = TRUE;
+ else if (finfo->info->strip_discarded
+ && (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ && elf_discarded_section (h->root.u.def.section))
strip = TRUE;
else
strip = FALSE;