[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 11:09:03 CEST 2005


Hello Peter,
PVO> I'm not sure that you are right. There were a solution found that
I can explain that reported smartlink problem is not a binutils
problem. I fixed generated asm code and got correct dll.

EDATA module:
**************

.section .bss

.section .edata
.globl  _$PROGRAM$_L1
_$PROGRAM$_L1:
        .long   0
        .long   0
        .short  0
        .short  0
        .rva    .L26
        .long   1
        .long   2
        .long   2
        .rva    .L27
        .rva    .L28
        .rva    .L29
.L26:
        .ascii  "CRPLUGIN.dll\000"
        .balign 4,0
.L27:
        .rva    P$CRPLUGIN_MODULEPROC$LONGINT$TMAP$PCHAR$LONGINT$LONGINT$LONGWORD$LONGWORD$$LONGBOOL
        .rva    P$CRPLUGIN_MODULEDATAMODE$$LONGINT
        .balign 4,0
.L28:
        .rva    .L30
        .rva    .L31
        .balign 4,0
.L29:
        .short  1
        .short  0
        .balign 4,0
        .balign 2,0
.L30:
        .ascii  "ModuleDataMode\000"
        .balign 2,0
.L31:
        .ascii  "ModuleProc\000"



Non-patched PASCALMAIN module:
**************
.section .text
        .balign 4
        .balign 4
.globl  PASCALMAIN
PASCALMAIN:
.globl  _P$CRPLUGIN_main
_P$CRPLUGIN_main:
        pushl   %ebp
        movl    %esp,%ebp
        call    FPC_INITIALIZEUNITS
        leave
        ret
        .balign 4


Fixed PASCALMAIN module:
************
.section .text
        .balign 4
        .balign 4
.globl  PASCALMAIN
PASCALMAIN:
.globl  _P$CRPLUGIN_main
_P$CRPLUGIN_main:
        pushl   %ebp
        movl    %esp,%ebp
        call    FPC_INITIALIZEUNITS
        leave
        ret
        .long   _$PROGRAM$_L1
        .balign 4


-- 
Best regards,
 Pavel                            mailto:pavel at insect.mail.iephb.ru






More information about the fpc-devel mailing list