Bugzilla – Bug 918899
windows:mingw:win32/mingw32-mozilla-nss-tools: Console Subsystem Bug
Last modified: 2015-02-23 16:46:25 UTC
Created attachment 624058 [details] objdump -x certutil.exe The mingw32/mingw64-mozilla-nss-tools seem to work properly, however something has gone wrong at the linking stage. The nss-tools executables have the "windows" (GUI, 0x2) subsystem specified in their respective PE and PE+ headers, which is wrong. This causes all standard input/output/error to be redirected to nul: (/dev/null). Since the nss-tools are command-line tools they are pretty useless if they do not print to stdout. Please see the "Subsystem" field in the attached objdump of certutil.exe. Instead, the headers should specify the "console" subsystem (CUI, 0x3). To fix this, please pass the "--subsystem console" switch to ld or "-Wl,--subsystem=console" switch to gcc.
Fixed now in the recent commit to mingw32-mozilla-nss and mingw64-mozilla-nss. When the relevant dependent packages rebuild and the repository consolidates, the executables in tools will have console subsystem.
Thank you for fixing this so quickly. Btw, in the meantime I have workaround this issue with "objcopy --subsystem console" on the affected executables but it is good to have a fix now. Reviewing your patch, you may want to set the "-mconsole" switch explicitly instead.