This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

DLL creating problem

Hello All,

I have a problem when trying to create a DLL.

For Ex:

i have two source files: file_asm.asm , file_c.c

global _function_asm
extern _printf
section .text
  push dword str
  call _printf
  add esp,0x04
  mov ecx,0x1000
  mov edi,bss_data
  rep stosd
section .data
  str db "String2print",0
section .bss
  bss_data resd 0x1000
void function_c(void){

I need to create a DLL(no-cygwin)

  nasm -f format -o file_asm.o   {format = elf | win32 | coff }
  gcc -c file_c.c -o file_c.o

  i use:
     gcc -shared ...
     ld -shared ...
     gcc -mdll ...
     ld -dll ...
     dllwrap ...
  but i can't create a true dll

  some switches creates not a dll.

  other creates a "wrong" dll. It has a section size problem and not
  working under the windowsXP or 2k. ( format == elf )
  or create a "incorrect" dll. It have a
     mov edi,bss_data+something   instead of   mov edi,bss_data
  (format == win32 or coff)

  please, give me a hint. How can i create a DLL.

Best regards,

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]