Fix crash in strip

Alan Modra amodra@bigpond.net.au
Sun Nov 9 22:29:00 GMT 2008


On Fri, Nov 07, 2008 at 11:40:06AM +0100, Andreas Schwab wrote:
> 	PR 7011
> 	* elf.c (assign_file_positions_for_non_load_sections): Handle
> 	PT_GNU_RELRO that covers only a part of a single section.

Can I ask you to do a little more work here?  Restructure the loop so
that it looks like

  for (m = elf_tdata (abfd)->segment_map, p = phdrs;
       ...
      if (p->p_type == PT_GNU_RELRO)
	...
      else if (m->count != 0)
	...
      else
        ...

That should improve maintainability.

-- 
Alan Modra
Australia Development Lab, IBM



More information about the Binutils mailing list