Hi
I worked with wine about six months ago. Except some minor errors my app worked quite good in wine. Then I didn't have time anymore. Now I tried again with the newest wine from cvs. But now I can't even start my app anymore. Wine gives me this error:
err:virtual:map_image FATAL: Need to relocate module from addr 40000000, but there are no relocation records wine: could not load 'C:\IMD\Bin\Imd.exe' as Win32 binary
I looked in the archives and the only messages concerning this error were at least two years old stating that this error has been fixed long ago. I didn't change this link address in my app (VC6), it has been there even before I started with wine at all. But when I change this address to say 0x48000000 then it works. So is there something else on this address?
I know six months is a long time and a lot happened this year. But does anybody know if this is a real error? What could have introduced this behaviour as it worked a few months ago?
Thanks
Fabi
On Mon, 14 Jul 2003 22:22, Fabian Cenedese wrote:
err:virtual:map_image FATAL: Need to relocate module from addr 40000000, but there are no relocation records wine: could not load 'C:\IMD\Bin\Imd.exe' as Win32 binary
Start wine win gdb, and issue:
break in main run
Check out which executable is in the offending region (my guess is it's wine itself, but it may also be some shared libraries).
On linux you can see what's at a particular address by looking in /proc/<process>/maps, but be aware that you'll probably find out there's some system libraries involved, and while you could always relink the wine libraries to load at a different address, doing so to system libraries is probably not a good idea.
I didn't change this link address in my app (VC6), it has been there even before I started with wine at all. But when I change this address to say 0x48000000 then it works. So is there something else on this address?
If it's your own app, why are you linking it without relocation records? This seems to be asking for trouble.
On Mon, 14 Jul 2003 22:22, Fabian Cenedese wrote:
err:virtual:map_image FATAL: Need to relocate module from addr 40000000, but there are no relocation records wine: could not load 'C:\IMD\Bin\Imd.exe' as Win32 binary
Start wine win gdb, and issue:
break in main run
Check out which executable is in the offending region (my guess is it's wine itself, but it may also be some shared libraries).
Then I guess it's not possible as wine can't relocate itself...
On linux you can see what's at a particular address by looking in /proc/<process>/maps, but be aware that you'll probably find out there's some system libraries involved, and while you could always relink the wine libraries to load at a different address, doing so to system libraries is probably not a good idea.
Ok, I will have a look.
I didn't change this link address in my app (VC6), it has been there even before I started with wine at all. But when I change this address to say 0x48000000 then it works. So is there something else on this address?
If it's your own app, why are you linking it without relocation records? This seems to be asking for trouble.
I don't think I link without relocation records, but I couldn't find that setting anyway. Where in VC6 would I have to change this? I can only see the base address, so I thought it's always relocatable. As there was never a problem in Windows I didn't think much about it. I only made sure that the exe and the needed dlls are all on different addresses so in case of a crash I know where it happened.
Thanks
bye Fabi
"Fabian Cenedese" Cenedese@indel.ch wrote:
Check out which executable is in the offending region (my guess is it's wine itself, but it may also be some shared libraries).
Then I guess it's not possible as wine can't relocate itself...
Probably it's another case of some kind of the "security" kernel patch which marks the area starting from 0x40000000 as a "not executable stack" and doesn't allow Wine to mmap it.
I don't think I link without relocation records, but I couldn't find that setting anyway. Where in VC6 would I have to change this? I can only see the base address, so I thought it's always relocatable. As there was never a problem in Windows I didn't think much about it. I only made sure that the exe and the needed dlls are all on different addresses so in case of a crash I know where it happened.
.exe's produced by the MS linker are not relocateable by default. In order to make them relocateable you can either add '/fixed:no' to the linker command line, or add the string '#pragma comment(linker, "/fixed:no")' to one of your sources.
"Dmitry Timoshkov" dmitry@baikal.ru wrote:
Probably it's another case of some kind of the "security" kernel patch which marks the area starting from 0x40000000 as a "not executable stack" and doesn't allow Wine to mmap it.
Of course correct default image base is 0x400000.
Hi
Quite old mail, but I just started to work on it again :)
At 16:07 15.07.2003 +0900, Dmitry Timoshkov wrote:
I don't think I link without relocation records, but I couldn't find that setting anyway. Where in VC6 would I have to change this? I can only see the base address, so I thought it's always relocatable. As there was never a problem in Windows I didn't think much about it. I only made sure that the exe and the needed dlls are all on different addresses so in case of a crash I know where it happened.
.exe's produced by the MS linker are not relocateable by default. In order to make them relocateable you can either add '/fixed:no' to the linker command line, or add the string '#pragma comment(linker, "/fixed:no")' to one of your sources.
Thanks, that did help. Actually the #pragma led to a linker crash in Release mode :) But entering the setting to the linker command line did work. But I guess I better set the link address to something else anyway.
bye Fabi