[fpc-devel] is smartlink of Win32 DLLs broken again? And a old	FreeBSD port problem additionaly
    Pavel V. Ozerski 
    pavel at insect.mail.iephb.ru
       
    Wed Apr 27 12:22:46 CEST 2005
    
    
  
Hello all,
It seems, I solved the smartlink problem.
Solution:
1) in pexports.pas, I added into interface part of unit
    var
      BinaryContainsExports: boolean = false;
2) in pexports.pas, in first line of main body of read_exports
procedure, I added
....
      begin
         BinaryContainsExports:=true; //NEW!!!
         DefString:='';
....
3) in pmodules.pas, I added a reference to pexports into the uses
clause of implementation part.
4) in pmodules.pas, I changed a line in proc_program procedure:
INSTEAD
         if assigned(exportlib) and
            (target_info.system in [system_i386_win32,system_i386_wdosx]) and
            assigned(current_module._exports.first) then
           codesegment.concat(tai_const.create_sym(exportlib.edatalabel));
I MADE
         if assigned(exportlib) and
            (target_info.system in [system_i386_win32,system_i386_wdosx]) and
            BinaryContainsExports then
           codesegment.concat(tai_const.create_sym(exportlib.edatalabel));
That's all. The patched compiler builds my tests correctly.
-- 
Best regards,
 Pavel                            mailto:pavel at insect.mail.iephb.ru
    
    
More information about the fpc-devel
mailing list