ld i386 differences 2.10.2 / 2.12

Alan Modra amodra@bigpond.net.au
Sun Apr 7 18:01:00 GMT 2002


On Tue, Mar 26, 2002 at 10:45:26PM +1030, Alan Modra wrote:
> On Tue, Mar 26, 2002 at 12:47:08PM +0100, Etienne Lorrain wrote:
> > /home/etienne/projet/toolchain/bin/ld: warning: no memory region specified
> > for section `.ld-2.12.bug_please_ignore_warning'
> > 
> >  Note that it is a strange warning for a "NOLOAD" section.
> 
> Indeed.  :-)

	* ldlang.c (lang_size_sections_1): Don't complain about
	SEC_NEVER_LOAD sections having no memory region specified.

Index: ld/ldlang.c
===================================================================
RCS file: /cvs/src/src/ld/ldlang.c,v
retrieving revision 1.79
diff -u -p -r1.79 ldlang.c
--- ld/ldlang.c	20 Mar 2002 07:49:53 -0000	1.79
+++ ld/ldlang.c	8 Apr 2002 00:21:07 -0000
@@ -2930,6 +2930,8 @@ lang_size_sections_1 (s, output_section_
 		       defined, issue a warning.  */
 		    if ((bfd_get_section_flags (output_bfd, os->bfd_section)
 			 & (SEC_ALLOC | SEC_LOAD)) != 0
+			&& (bfd_get_section_flags (output_bfd, os->bfd_section)
+			    & SEC_NEVER_LOAD) == 0
 			&& ! link_info.relocateable
 			&& strcmp (os->region->name, "*default*") == 0
 			&& lang_memory_region_list != NULL

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list