diff options
author | Nick Clifton <nickc@redhat.com> | 2003-10-04 10:19:26 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2003-10-04 10:19:26 +0000 |
commit | a3244d520238060095234c2b62b4069ad3c5690f (patch) | |
tree | 2ae0e8e28d711b83f60109cc61e86667c7fd4687 /bfd/merge.c | |
parent | aa8b8875415b5c3168756f7c8df06b3fc68be482 (diff) | |
download | binutils-redhat-a3244d520238060095234c2b62b4069ad3c5690f.tar.gz |
Set SEC_EXCLUDE flag on sections which become empty after merging.
Diffstat (limited to 'bfd/merge.c')
-rw-r--r-- | bfd/merge.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bfd/merge.c b/bfd/merge.c index aa8b334cf1..0371bd0f4a 100644 --- a/bfd/merge.c +++ b/bfd/merge.c @@ -787,11 +787,14 @@ _bfd_merge_sections (bfd *abfd ATTRIBUTE_UNUSED, void *xsinfo, secinfo->sec->_cooked_size = size; } - /* Finally shrink all input sections which have not made it into + /* Finally remove all input sections which have not made it into the hash table at all. */ for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next) if (secinfo->first == NULL) - secinfo->sec->_cooked_size = 0; + { + secinfo->sec->_cooked_size = 0; + secinfo->sec->flags |= SEC_EXCLUDE; + } } return TRUE; |