aboutsummaryrefslogtreecommitdiff
path: root/bfd/cofflink.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2009-10-10 04:58:48 +0000
committerAlan Modra <amodra@gmail.com>2009-10-10 04:58:48 +0000
commitf08036905689c42e7d27f72c8a22c82812d23597 (patch)
treeeda47cacee7e5d9530086f4797d8e5ec6e60911e /bfd/cofflink.c
parentf3048a1d4770f01625461c6d967a774f5a3f8496 (diff)
downloadgdb-f08036905689c42e7d27f72c8a22c82812d23597.zip
gdb-f08036905689c42e7d27f72c8a22c82812d23597.tar.gz
gdb-f08036905689c42e7d27f72c8a22c82812d23597.tar.bz2
* cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols for
excluded output sections.
Diffstat (limited to 'bfd/cofflink.c')
-rw-r--r--bfd/cofflink.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/bfd/cofflink.c b/bfd/cofflink.c
index 3253e5e..a29b687 100644
--- a/bfd/cofflink.c
+++ b/bfd/cofflink.c
@@ -1514,11 +1514,13 @@ _bfd_coff_link_input_bfd (struct coff_final_link_info *finfo, bfd *input_bfd)
/* Skip section symbols for sections which are not going to be
emitted. */
if (!skip
- && dont_skip_symbol == 0
+ && !dont_skip_symbol
&& isym.n_sclass == C_STAT
&& isym.n_type == T_NULL
- && isym.n_numaux > 0
- && (*secpp)->output_section == bfd_abs_section_ptr)
+ && isym.n_numaux > 0
+ && ((*secpp)->output_section == bfd_abs_section_ptr
+ || bfd_section_removed_from_list (output_bfd,
+ (*secpp)->output_section)))
skip = TRUE;
#endif