Re: 3.2 and dll loading?
- Posted by Matt Lewis <matthewwalkerlewis at ?mail.?om> Apr 27, 2008
- 626 views
Jeremy Cowgar wrote: > > Matt Lewis wrote: > > > > I think this may be the problem. I don't think that we've got the offsets > > for 4.3, which must have changed. Take a look at be_callc.c. I updated > > for the latest gcc I was using. Looks like you'll need to do some more > > ifdef'ing. > > Matt, I have not messed with the offsets in GCC, nor do I really even know > what > I'm looking for. How can I find the offsets required for 4.3? I don't mind > changing, > testing, etc... but I'm not sure where to even look for what they should be. > I see the file you mentioned and it seems easy enough to update, once I figure > out what I should update to. Basically, you need to take a look at the asm output. It's automatiacally made (be_callc.s) during the build. If you look in the c code, you'll see this line: arg = arg+argsize+9999; // just a marker for asm code This is there basically to help you find the critical spot, and to figure out what the correct values should be. At the top of the file, you'll see these values for gcc 4.1.2: #define push() asm("pushl -124(%ebp)") #define pop() asm( "addl -128(%ebp), %esp") You're looking for something similar. The gcc devs like to change this stuff a lot (Watcom has been more stable). There's some information in readme.txt in the source directory. If you're still having trouble, email me the file, and I'll take a look at it. Matt