[fpc-pascal] Exporting from Elf okay?
With regards to MS Windows: There are some myths out there which say you cannot export functions from exe's.. but this supposedly was only true back pre 386 versions of windows. In win32 supposedly exporting from an exe is the same as a DLL. With regards to gnu linux: How about the Elf format? Is it possible to export code from an elf? (i.e. export functions) (I'm not worried about shared PIC. I just want to know if you can call some functions from an ELF, which is, from what I know, non PIC ) It's too bad so many people have spread rumors about the exe format. But now, I want to know about the elf format and clear up any confusion. One other question, which is offtopic and straying away from the subject: The Mac.. does it use a format very similar to Elf/SO , or does it use it's own custom format? regards. Lars p.s. thanks Jonas for helping before, to clear up some confusion about PIC questions, now I have to clear up more confusion about exporting ;-). ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] lazarus crash at start
Trying to find why lazarus crashes at start in win98 I found a courious problem, global variable IsConsole is true when it should be false as lazarus is built as a gui application. Digging I found that IsConsole is set in two functions in wprt0.as: _mainCRTStartup sets to true and _WinMainCRTStartup sets to False, this cause a wrong setup of standard Output that DebugLn (lclprocs.pas) use to emit debug messages. It seems that this functions are 'used' in the linker script, for example ld .--verbose shows that by default a ENTRY(_mainCRTStartup) it's used. I looked into the generated lazarus link.res file and didn't find a ENTRY section so I guess it uses the default and that's why even when lazarus is a gui app, it's linked as a console app. To demostrate this I modified the link.res script to inculde ENTRY(_WinMainCRTStartup) section and then linked, the resulting lazarus.exe file now behaves as a gui app and won't crash at start. It seems that WriteResponseFile lacks the code to add the ENTRY section to the link.res script but I don't know if it's supposed to be there or should it be in another stage, any comments? Jesus Reyes A. __ Correo Yahoo! Espacio para todos tus mensajes, antivirus y antispam ¡gratis! Regístrate ya - http://correo.yahoo.com.mx/ ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal