Message-ID: <000901c30700$9909da20$0100a8c0@acp42g> From: "Andrew Cottrell" To: "Charles Sandmann" Cc: References: <10304200456 DOT AA22077 AT clio DOT rice DOT edu> Subject: Re: dxe review Date: Sun, 20 Apr 2003 15:49:23 +1000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Reply-To: djgpp-workers AT delorie DOT com > > I tried two real world test with Allgro and Grep and unfortunatly both > > failed as indicated below. Am I correct in my interpretation of the docs in > > that the DXE code must not call code in LIBC which is linked with the app? > > If I am wrong then any ideas on the problems below? > > For any module which uses symbols in the main image, you must tell it where > to find them. This is ugly. Use dxe3res to create a wrapper which does > it automatically. After reading the documentation, I am convinced that > this advice should be moved to the top as it's the "most powerful" and > "requires minimal interaction from the user". The other methods require > writing non-standard code which no one will want to maintain. 100% agree and I would also suggest that something like the following be added:- If the code in a DXE calls a function that is not in another DXE then you must use dxe3res on the DXE(s) that are to be used by the executable. > The where to find "printf" type problem really hinders the dlopen() > usefulness for compatibility purposes - and will continue to do so > unless the location of all routines is stored in the image always. > (I have a plan to make libc dynamic which automatically would provide > all this info - but time is too short to finish it in the next few > weeks). I agree. > > Thanks for the tests - I'll do a new pass at the documentation... > Try dxe3res and let us know if that works. Allegro test:- With allegro I got further, but the exe crashes somewhere in the Allegro graphics routines. Grep test:- I still get an unresolved symbol, but I can't figure out what to do next. I tried only converting libintl to a dxe and leaving libiconv and vice versa, but I got multiple definition of `_locale_charset'. The unresolved symbol error now is:- DJ204 D:\dj204\gnu\grep-2.51\src>grep libintl.DXE: module loading failed (unresolved symbol: _libiconv) Abort! Exiting due to signal SIGABRT I found that _libiconv is in the libintl library. The following may help. DJ204 D:\dj204\gnu\grep-2.51\src>\dj204\bin\grep -U _libiconv *.* Binary file grep.exe matches grepinc.c:DXE_EXPORT_TABLE_AUTO (___dxe_eta___libiconv_libintl) Binary file grepinc.o matches Binary file libiconv.DXE matches Binary file libiconv.a matches Binary file libiconv_I.A matches Binary file libintl.DXE matches Binary file libintl.a matches Andrew