This is the mail archive of the cygwin@sources.redhat.com 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]

Re: ld -shared and @ordinals in .def files





>From: DJ Delorie <dj@delorie.com>
>Oops, I meant this patch, which should also fix the NONAME bug:
>
>Index: pe-dll.c
>===================================================================

Doesn't help on -mno-cygwin at least.
The patch (applied to binutils-20000913) makes things worse

gcc -shared -Wl,--out-implib,libcdll.a,--output-def,cdll.def \
	 -o cdll.dll cdll.o dllinit.o
gives this output-def, cdll.def

EXPORTS

    dll_double_square @1
    dll_float_square @2
    dll_get_global_int_var @3
    dll_global_int_var @4 DATA
    dll_int_square @5
    dll_set_global_int_var @6

and a dll with these exports:
Export  Ordinal     Hint        Function                Entry Point
------  ----------  ----------  ----------------------  ------------
[O  ]   1 (0x0001)         N/A  N/A                     0x0000105C
[C  ]   2 (0x0002)  0 (0x0000)  dll_double_square       0x00001074
[C  ]   3 (0x0003)  1 (0x0001)  dll_float_square        0x00001094
[C  ]   4 (0x0004)  2 (0x0002)  dll_get_global_int_var  0x00002000
[C  ]   5 (0x0005)  3 (0x0003)  dll_global_int_var      0x00001048
[C  ]   6 (0x0006)  4 (0x0004)  dll_int_square          0x00001084
[C F]   7 (0x0007)  5 (0x0005)  dll_set_global_int_var  dll_double_square


Inputting a cdll.def file (the --output-def from above) like so:
gcc -shared -Wl,--out-implib,libcdll.a \
	 -o cdll.dll cdll.def cdll.o dllinit.o

Produces the same exports in cdll.dll

Neither work.

Anybody else have success?

Cheers.
Danny
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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