From 25263aad5c7e9ce7fc742771b276463a0375b481 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 18 Oct 2001 08:22:44 +0000 Subject: * section.c (_bfd_strip_section_from_output): Don't count SEC_EXCLUDE sections as references. Set SEC_EXCLUDE. --- bfd/ChangeLog | 5 +++++ bfd/section.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'bfd') diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 3356f8a..8d0b220 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2001-10-18 Jakub Jelinek + + * section.c (_bfd_strip_section_from_output): Don't count + SEC_EXCLUDE sections as references. Set SEC_EXCLUDE. + 2001-10-17 Alan Modra * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to diff --git a/bfd/section.c b/bfd/section.c index b2a366a..53491f1 100644 --- a/bfd/section.c +++ b/bfd/section.c @@ -1250,7 +1250,8 @@ _bfd_strip_section_from_output (info, s) asection *is; for (is = abfd->sections; is != NULL; is = is->next) { - if (is != s && is->output_section == os) + if (is != s && is->output_section == os + && (is->flags & SEC_EXCLUDE) == 0) break; } if (is != NULL) @@ -1273,4 +1274,6 @@ _bfd_strip_section_from_output (info, s) break; } } + + s->flags |= SEC_EXCLUDE; } -- cgit v1.1