Bug 7011 - strip crashes in _bfd_elf_compute_section_file_positions
Summary: strip crashes in _bfd_elf_compute_section_file_positions
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.20
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-06 15:01 UTC by Andreas Schwab
Modified: 2008-12-23 10:08 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
Testcase (2.85 KB, application/octet-stream)
2008-11-06 15:01 UTC, Andreas Schwab
Details

Note You need to log in before you can comment on or make changes to this bug.
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