This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fix --check-sections consistency error


--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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]