Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 337448

Summary: CygwinPEBinaryObject and symbol addresses
Product: [Tools] CDT Reporter: Xavier Raynaud <xavier.raynaud>
Component: cdt-coreAssignee: Project Inbox <cdt-core-inbox>
Status: CLOSED DUPLICATE QA Contact: Doug Schaefer <cdtdoug>
Severity: normal    
Priority: P3 CC: aleherb+eclipse, cdtdoug
Version: 6.0   
Target Milestone: 7.0   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
a 32bit executable generated with cygwin on Windows XP none

Description Xavier Raynaud CLA 2011-02-17 10:20:31 EST
Created attachment 189194 [details]
a 32bit executable generated with cygwin on Windows XP

Hi,


I have a 32 bit executable generated with cywin on WindowsXP (with gcc 4.3.4).
I had a look on the way CygwinPEBinaryObject loads symbols of this binary file, and found some strange things.

For example, according to CygwinPEBinaryObject, symbol "_mainCRTStartup" is located at address "0x400200".

However, the cygwin binutils do not give the same result:
$ nm a.exe | grep _mainCRTStartup
00401000 T _mainCRTStartup


Do I miss something ?


Xavier
Comment 1 Xavier Raynaud CLA 2011-02-18 03:32:29 EST
In other words, there is an offset of 0xe00 between symbol addresses given by "nm" and symbol addresses given by CygwinPEBinaryObject

X
Comment 2 Anton Leherbauer CLA 2011-02-18 09:05:31 EST
I quickly debugged this with CDT 7.0.2 and for me the CygwinPEBinaryObject assigns a value of 4198400 (0x401000) for _mainCRTStartup.
Comment 3 Xavier Raynaud CLA 2011-02-22 05:59:01 EST
Hi,

I investigate deeper on that, and I found that this bug has been fixed by revision 1.27 of org.eclipse.cdt.utils.coff.PE.

So it's fixed in CDT 7.0

I mark the bug a closed/fixed.
Comment 4 Xavier Raynaud CLA 2011-02-22 07:22:44 EST
duplicate of https://bugs.eclipse.org/bugs/show_bug.cgi?id=291840
Comment 5 Anton Leherbauer CLA 2011-02-22 07:28:16 EST
Thanks for the update.

*** This bug has been marked as a duplicate of bug 291840 ***