gas failure on ELF groups.

Alan Modra amodra@bigpond.net.au
Tue Feb 27 08:14:00 GMT 2007


elf_frob_file runs after all frags have been converted to rs_fill
type.  If the frag_more call here needs to create a new frag (rather
than the usual extension of an existing frag), the new frag type
will not be set, leading to an assertion failure.

	* config/obj-elf.c (elf_frob_file): frag_wane any new frags.

Index: gas/config/obj-elf.c
===================================================================
RCS file: /cvs/src/src/gas/config/obj-elf.c,v
retrieving revision 1.100
diff -u -p -r1.100 obj-elf.c
--- gas/config/obj-elf.c	5 Feb 2007 20:10:25 -0000	1.100
+++ gas/config/obj-elf.c	27 Feb 2007 03:14:59 -0000
@@ -1987,6 +1987,7 @@ elf_frob_file (void)
       bfd_set_section_size (stdoutput, s, size);
       s->contents = (unsigned char *) frag_more (size);
       frag_now->fr_fix = frag_now_fix_octets ();
+      frag_wane (frag_now);
     }
 
 #ifdef elf_tc_final_processing

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



More information about the Binutils mailing list