* ldgram.y: allow section types without address expressions.
authorSteve Chamberlain <sac@cygnus>
Fri, 12 Feb 1993 16:12:28 +0000 (16:12 +0000)
committerSteve Chamberlain <sac@cygnus>
Fri, 12 Feb 1993 16:12:28 +0000 (16:12 +0000)
* ldlang.c (lang_relocate_globals): avoid possible hang with
undefined but unreferenced symbols.
* relax.c (relax_section): don't complain if the script file isn't
relaxable but -relax is set

ld/relax.c

index 70f35f6d718435be007643d99381424fe55d406a..2db31806d5d338e2ae11fb0bbb90dec9834e416e 100644 (file)
@@ -193,12 +193,13 @@ boolean
 DEFUN(relax_section,(this_ptr),
       lang_statement_union_type **this_ptr)
 {
-
+  extern lang_input_statement_type *script_file;
   lang_input_section_type *is = &((*this_ptr)->input_section);
   asection *i = is->section;
   if (!(i->owner->flags & BFD_IS_RELAXABLE)) 
   {
-    einfo("%B: not assembled with -linkrelax\n", i->owner);    
+    if (i->owner != script_file->the_bfd)
+     einfo("%B: not assembled with -linkrelax\n", i->owner);    
   }
 
   return bfd_relax_section(i->owner, i, is->ifile->asymbols);