[Patch: pe-i386] ld/deffilep.y (import_def): Use default extension 'dll'
Danny Smith
danny_r_smith_2001@yahoo.co.nz
Thu Mar 13 08:35:00 GMT 2003
More information about the Binutils mailing list
Thu Mar 13 08:35:00 GMT 2003
- Previous message (by thread): [Patch/pe-i386]: Revert and fix ld/deffilep.y patch for names with '.' separators
- Next message (by thread): [Patch: pe-i386] ld/deffilep.y (import_def): Use default extension 'dll'
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Common usage for IMPORT section definitions in def files omit the dll module extension name eg: IMPORTS my_api_stdcallname@8 = Vendor.PascalName where PascalName is imported from Vendor.dll (MS does not document this feature much, but it seems to be more widely used with Borland compiler. See, eg. http://web.bham.ac.uk/carterd/glide/define.htm) This fails with current ld. A default extension is not provided. Although a dll is created, at load time the user dll looks for but cannot find the module Vendor (but could find Vendor.dll). Fixed so: 2003-03-13 Danny Smith <dannysmith@users.sourceforge,net> * deffilep.y (def_import): Use default extension of "dll" if no extension provided in parsed IMPORT command. *** deffilep.y Thu Mar 13 06:35:23 2003 --- deffilep.y.new Thu Mar 13 07:23:39 2003 *************** def_import (internal_name, module, dllex *** 807,819 **** int ordinal; { char *buf = 0; ! ! if (dllext != NULL) ! { ! buf = (char *) xmalloc (strlen (module) + strlen (dllext) + 2); ! sprintf (buf, "%s.%s", module, dllext); ! module = buf; ! } def_file_add_import (def, name, module, ordinal, internal_name); if (buf) --- 807,818 ---- int ordinal; { char *buf = 0; ! const char default_ext[] = "dll"; ! const char *ext = dllext ? dllext : default_ext; ! ! buf = (char *) xmalloc (strlen (module) + strlen (ext) + 2); ! sprintf (buf, "%s.%s", module, ext); ! module = buf; def_file_add_import (def, name, module, ordinal, internal_name); if (buf) http://mobile.yahoo.com.au - Yahoo! Mobile - Check & compose your email via SMS on your Telstra or Vodafone mobile.
- Previous message (by thread): [Patch/pe-i386]: Revert and fix ld/deffilep.y patch for names with '.' separators
- Next message (by thread): [Patch: pe-i386] ld/deffilep.y (import_def): Use default extension 'dll'
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Binutils mailing list