Mail Archives: cygwin/2001/07/23/18:32:14
Hello Cygwin.
I have been trying to build a hello world dll for my RIM pager (that's how you
send apps to the little 386-brained gadget) and the compilation has been going
great. However, the dll does not seem to look and smell like the dll the
device is expecting so it won't get past the loader and onto the machine. I
have objdump-ed the sample dlls built with VC++ and seen a few differences. I
do not link in cygwin.dll or mingw32 (the gizmo has it's own stdlibs).
My dllwrap invocation looks like:
//c/cygwin/bin/dllwrap.exe --target=i386 --image-base 0x10000000
--entry=_PagerMain --verbose --machine i386 --no-idata4 --no-idata5
--export-all-symbols --def ./HelloWorld.def --driver-flags '-mi386
-nostartfiles -nostdlib -Wl,--dll -Wl,--traditional-format
-Wl,--discard-locals -Wl,--entry=_PagerMain -Wl,--file-alignment,0x1000
-Wl,--heap,0x100000 -Wl,--stack,0x100000' --dllname HelloWorld.dll
My HelloWorld:
HelloWorld.dll: file format pei-i386
HelloWorld.dll
architecture: i386, flags 0x00000133:
HAS_RELOC, EXEC_P, HAS_SYMS, HAS_LOCALS, D_PAGED
start address 0x100011c0
Characteristics 0x2206
executable
line numbers stripped
debugging information removed
DLL
...My section names are very different...
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 00001000 10001000 10001000 00001000 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA
1 .data 00001000 10002000 10002000 00002000 2**2
CONTENTS, ALLOC, LOAD, DATA
2 .rimdep 00001000 10003000 10003000 00003000 2**2
CONTENTS, ALLOC, LOAD, DATA
3 .version 00001000 10004000 10004000 00004000 2**2
CONTENTS, ALLOC, LOAD, DATA
4 .bss 00000010 10005000 10005000 00000000 2**2
ALLOC
5 .edata 00001000 10006000 10006000 00005000 2**2
CONTENTS, ALLOC, LOAD, DATA
6 .idata 00001000 10007000 10007000 00006000 2**2
CONTENTS, ALLOC, LOAD, DATA
7 .CRT 00001000 10008000 10008000 00007000 2**2
CONTENTS, ALLOC, LOAD, DATA
8 .reloc 00001000 10009000 10009000 00008000 2**2
CONTENTS, ALLOC, LOAD, DATA
Their App built with MSVC++:
sparrow20.dll: file format pei-i386
sparrow20.dll
architecture: i386, flags 0x0000010b:
HAS_RELOC, EXEC_P, HAS_DEBUG, D_PAGED
start address 0x10001000
Characteristics 0x210e
executable
line numbers stripped
symbols stripped
32 bit words <===== mine doesn't have this - what flags do I feed ld?
DLL
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 0000c600 10001000 10001000 00000400 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .rdata 00005400 1000e000 1000e000 0000ca00 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .data 00000200 10014000 10014000 00011e00 2**2
CONTENTS, ALLOC, LOAD, DATA
3 .version 00000200 10015000 10015000 00012000 2**2
CONTENTS, ALLOC, LOAD, DATA
4 .rimdep 00000200 10016000 10016000 00012200 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .reloc 00001e00 10017000 10017000 00012400 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA, DEBUGGING
Any ideas on how to make my dll more like what VC++ spits out. I don't have a
binary spec from the RIM pagers designers, and they only sanction the use of
their SDK headers and dlls with VC++ 5.0 and beyond so I'm getting very little
help there...
-Justin.
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -