Bug 7011

Summary: strip crashes in _bfd_elf_compute_section_file_positions
Product: binutils Reporter: Andreas Schwab <schwab>
Component: binutilsAssignee: unassigned
Status: RESOLVED FIXED    
Severity: normal CC: bug-binutils
Priority: P2    
Version: 2.20   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Attachments: Testcase

Description Andreas Schwab 2008-11-06 15:01:06 UTC
This is broken since PT_GNU_RELRO has been added in 2004.

Starting program: /tmp/test/test/binutils/strip-new test

Program received signal SIGSEGV, Segmentation fault.
0x40000000000ac441 in _bfd_elf_compute_section_file_positions (
    abfd=0x6000000000022e70, link_info=0x0) at ../../binutils/bfd/elf.c:4706
4706                      if (lp->p_type == PT_LOAD
Comment 1 Andreas Schwab 2008-11-06 15:01:41 UTC
Created attachment 3045 [details]
Testcase
Comment 2 Andreas Schwab 2008-11-10 22:49:11 UTC
Fixed.
Comment 3 Matthias Klose 2008-12-12 17:52:43 UTC
please could you consider the fix for the 2.19 branch as well?
Comment 4 Sourceware Commits 2008-12-23 10:07:01 UTC
Subject: Bug 7011

CVSROOT:	/cvs/src
Module name:	src
Branch: 	binutils-2_19-branch
Changes by:	nickc@sourceware.org	2008-12-23 10:06:46

Modified files:
	bfd            : ChangeLog elf.c 

Log message:
	* Import this patch from the mainline:
	2008-11-10  Andreas Schwab  <schwab@suse.de>
	
	PR 7011
	* elf.c (assign_file_positions_for_non_load_sections): Handle
	PT_GNU_RELRO specially.

Patches:
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&only_with_tag=binutils-2_19-branch&r1=1.4318.2.19&r2=1.4318.2.20
http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/bfd/elf.c.diff?cvsroot=src&only_with_tag=binutils-2_19-branch&r1=1.462.2.2&r2=1.462.2.3

Comment 5 Nick Clifton 2008-12-23 10:08:08 UTC
Hi Matthias,

  I have checked the patch into the 2.19 branch, but it is up to the release
manager to decide if there should be a 2.19.1 point release.  I will email him
and see what he thinks.

Cheers
  Nick