Hi,
        We managed to compile mfc using winelib after changes in wine header
files. Also managed to compile a mfc based application with winelib. But
on running the application gives segmentation fault.
        We have made spec file for application and also linked it with
winestub.o.

Details :
Redhat 6.1 kernel 2.2.12
gcc 2.91.66
Wine-20000326
MFC 4.21

Stack Trace:
******************************************************************
(gdb) run
Starting program: /home/rajesh/new/winelibnew
 
Program received signal SIGSEGV, Segmentation fault.
TlsAlloc () at ../include/winnt.h:1077
1077        __asm__(".byte 0x64\n\tmovl (0x18),%0" : "=r" (teb));
(gdb) bt
#0  TlsAlloc () at ../include/winnt.h:1077
#1  0x405ecae1 in CThreadSlotData::CThreadSlotData (this=0x40695740) at
afxtls.cpp:124
#2  0x405ed31d in CThreadLocalObject::GetData (this=0x40695724,
    pfnCreateObject=0x40651580
<CThreadLocal<_AFX_THREAD_STATE>::CreateObject(void)>)
    at afxtls.cpp:383
#3  0x4065155f in CThreadLocal<_AFX_THREAD_STATE>::GetData
(this=0x40695724)
    at ../include/afxtls_.h:172
#4  0x40652206 in CThreadLocal<_AFX_THREAD_STATE>::operator
_AFX_THREAD_STATE * (this=0x40695724)
    at ../include/afxtls_.h:182
#5  0x405ec699 in AfxGetModuleState () at afxstate.cpp:224
#6  0x4064eb50 in AfxInitialize (bDLL=0, dwVersion=1057) at
appmodul.cpp:41
#7  0x4064eb88 in _AFX_TERM_APP_STATE::_AFX_TERM_APP_STATE
(this=0x406972f8) at appmodul.cpp:70
#8  0x4064ec16 in global constructors keyed to WinMain () at
appmodul.cpp:88
#9  0x40651384 in __do_global_ctors_aux () at olelock.cpp:107
#10 0x405d42fa in _init () from
/home/rajesh/wine/wine-20000326/libmfc.so
(gdb)  
*******************************************************************

Where does _init() reside in libmfc.so?

Putting a breakpoint at _start(0x804b0b0 which is the ELF entry point)
does not help
it receives segfault before that.

Is it essential to use a seperate loader to run mfc based apps? 

Thanks
Vivek

Reply via email to