AttachConsole broken autoload

Dave Korn
Sat Jul 4 12:34:00 GMT 2009

  Got this error when I tried to run with a DLL built from today's CVS HEAD:

> ---------------------------
> bash.exe - Entry Point Not Found
> ---------------------------
> The procedure entry point AttachConsole could not be located in the dynamic link library KERNEL32.dll. 
> ---------------------------
> OK   
> ---------------------------

  Checked that it doesn't exist on W2K:
> Minimum supported client	Windows XP
> Minimum supported server	Windows Server 2003

  Something's gone wrong with the autoload definition, because here's the

> $ nm fhandler_console.o | grep AttachConsole
>          U _AttachConsole@4

... but here's the definition:

> $ nm autoload.o | grep AttachConsole
> 00000000 T _AttachConsole@0
> 00000000 T _win32_AttachConsole@0

... leading to the DLL still having an explicit import for it:

> $ dumpbin /imports new-cygwin1.dll | grep AttachConsole
>                    D  AttachConsole

  Attached patch looks like the obvious fix to me and builds a DLL without an
import for AttachConsole; resulting DLL loads and runs on W2k.  Ok?

	* (AttachConsole):  Correct size of args.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: autoload-attachconsole-fix.diff
Type: text/x-c
Size: 674 bytes
Desc: not available
URL: <>

More information about the Cygwin-patches mailing list