Bug 88992 - Elf binary parser does not seek to each section header
Summary: Elf binary parser does not seek to each section header
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0   Edit
Assignee: David Inglis CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2005-03-24 09:14 EST by Eric ter Haar CLA
Modified: 2008-06-18 19:16 EDT (History)
0 users

See Also:


Attachments
patch to Elf.java for the described change; also adds e_machine values (1.86 KB, patch)
2005-03-24 09:18 EST, Eric ter Haar CLA
bjorn.freeman-benson: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric ter Haar CLA 2005-03-24 09:14:50 EST
The method getSections() in Elf.java (org.eclipse.cdt.utils.elf) only seeks to
the start of the section headers. It should seek to each section header using
e_shoff + e_shentsize * section_number.
With reading the symbols in loadSymbolsBySection() this is done similarly. It
gives the guarantee that reading the elf file will not fail if the records are
extended, for whatever reason.
Comment 1 Eric ter Haar CLA 2005-03-24 09:18:48 EST
Created attachment 19156 [details]
patch to Elf.java for the described change; also adds e_machine values
Comment 2 David Inglis CLA 2005-03-24 12:00:00 EST
Thanks, patch applied