From: Robert K. <ro...@ko...> - 2002-07-24 13:39:11
|
Congratulations. Let's hope this is the only thing that has to be fixed in order to run MSVC compilend pgms. It's at least an impotand step. Whose mistake is it ? MSVC, Mingw, NT or ROS? Eric Kohl schrieb: >Hi! > >I just found out why application compiled with MSVC++ don't run on ReactOS. > >These apps have a slighly different layout compared to apps compiled with >MinGW. MSVC++ stores the IAT (Import Address Table) inside of the .rdata >section, MinGW stores the IAT inside of the .data section. Now the problem >is that the .rdata setion is read-only. To fix-up the IAT of an application >the offsets stored in the IAT must be overwritten by the real import >addresses. Obviously this wont work if the IAT is inside of a read-only >section. > >To fix this bug I added calls to NtProtectVirtualMemory() to the fixup >routine to change the IAT's protection to read-write before it is modified >and reset its protection after the fixup is done. > >When I had a look at NtProtectVirtualMemory() I saw that its core >functionality is disabled. What's wrong? > > >Regards, >Eric > >Eric > > > >------------------------------------------------------- >This sf.net email is sponsored by:ThinkGeek >Welcome to geek heaven. >http://thinkgeek.com/sf >_______________________________________________ >reactos-kernel mailing list >rea...@li... >https://lists.sourceforge.net/lists/listinfo/reactos-kernel > > |