On Sun, 2009-11-01 at 17:17 +0100, Vincent R. wrote: > 1) Put section .edata and .idata inside .rdata > 2) Put .bss data inside .data instead of emitting a .bss section > 3) Fix IAT because value is NULL > 4) Fix Pointer To Symbol Table because value is NULL
As I wrote earlier, #3 is changed but the DLL doesn't start working on WM 6.1 (emulator) yet. I've looked at #1 and #2. They involve moving around stuff in the linker script. Not very hard at first sight. But, when you do that, you affect data on which the code relies. Moving .edata inside .rdata makes ld crash (when creating an application that uses the DLL : in line 3051 in pe-dll.c "Skip unwanted symbols, which are exported in buggy auto-import releases"). So I can create a DLL that has fewer sections and that has the IAT pointer non-NULL. I've been staring at what it points to, I'm not convinced that this is right. But now for the surprise. When loading the DLL with testapi, it successfully loads, and appears to know the function it exports : Started processing DLL(testDll.dll) testDll.dll doesn't know about open testDll.dll implements getDLLValue (0x017C108C) Don't worry about the line about "open", I put that in the testapi.in.txt intentionally. When trying to run this with a test application, still no success but a different error message. Now the application appears to crash. So I may be getting somewhere. Not sure why though. Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel