Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 337448 - CygwinPEBinaryObject and symbol addresses
Summary: CygwinPEBinaryObject and symbol addresses
Status: CLOSED DUPLICATE of bug 291840
Alias: None
Product: CDT
Classification: Tools
Component: cdt-core (show other bugs)
Version: 6.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 7.0   Edit
Assignee: Project Inbox CLA
QA Contact: Doug Schaefer CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-17 10:20 EST by Xavier Raynaud CLA
Modified: 2011-02-22 07:28 EST (History)
2 users (show)

See Also:


Attachments
a 32bit executable generated with cygwin on Windows XP (28.48 KB, application/x-msdos-program)
2011-02-17 10:20 EST, Xavier Raynaud CLA
no flags Details

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