This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
fix --check-sections consistency error
- From: Alexandre Oliva <aoliva at redhat dot com>
- To: binutils at sources dot redhat dot com
- Date: 08 Oct 2003 19:17:09 -0300
- Subject: fix --check-sections consistency error
- Organization: GCC Team, Red Hat
--check-sections ignores zero-sized sections in some, but not all
cases. This fixes one case I happened to run into. Nick approved
this, so I'm checking it in.
Index: ld/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* ldlang.c (lang_size_sections_1): Use IGNORE_SECTION to tell
whether to skip test for no memory region.
Index: ld/ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.117
diff -u -p -r1.117 ldlang.c
--- ld/ldlang.c 27 Jul 2003 11:58:28 -0000 1.117
+++ ld/ldlang.c 8 Oct 2003 21:37:04 -0000
@@ -2801,8 +2801,7 @@ lang_size_sections_1
/* If a loadable section is using the default memory
region, and some non default memory regions were
defined, issue an error message. */
- if ((bfd_get_section_flags (output_bfd, os->bfd_section)
- & (SEC_ALLOC | SEC_LOAD)) != 0
+ if (!IGNORE_SECTION (output_bfd, os->bfd_section)
&& (bfd_get_section_flags (output_bfd, os->bfd_section)
& SEC_NEVER_LOAD) == 0
&& ! link_info.relocatable
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist Professional serial bug killer