Bug 12408 - "readelf -w" doesn't reset dump_sects on archive
Summary: "readelf -w" doesn't reset dump_sects on archive
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.22
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-18 17:42 UTC by H.J. Lu
Modified: 2011-01-18 17:59 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2011-01-18 17:42:35 UTC
I got

readelf -w ..
...
readelf: Warning: Section 24 was not dumped because it does not exist!
readelf: Warning: Section 24 was not dumped because it does not exist!
readelf: Warning: Section 24 was not dumped because it does not exist!
readelf: Warning: Section 24 was not dumped because it does not exist!
readelf: Warning: Section 24 was not dumped because it does not exist!
readelf: Warning: Section 24 was not dumped because it does not exist!

process_archive doesn't reset dump_sects after processing each
archive member. We are reusing dump_sects from the largest
dump_sects.
Comment 1 Sourceware Commits 2011-01-18 17:44:01 UTC
CVSROOT:	/cvs/src
Module name:	src
Changes by:	hjl@sourceware.org	2011-01-18 17:43:57

Modified files:
	binutils       : ChangeLog readelf.c 

Log message:
	Reset dump_sects after processing each archive member.
	
	2011-01-18  H.J. Lu  <hongjiu.lu@intel.com>
	
	PR binutils/12408
	* readelf.c (process_archive): Free and reset dump_sects
	after processing each archive member.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/ChangeLog.diff?cvsroot=src&r1=1.1737&r2=1.1738
http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/readelf.c.diff?cvsroot=src&r1=1.529&r2=1.530
Comment 2 H.J. Lu 2011-01-18 17:59:33 UTC
Fixed.