[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Win32: TinyC subsystem GUI

From: grischka
Subject: Re: [Tinycc-devel] Win32: TinyC subsystem GUI
Date: Fri, 02 Apr 2010 13:26:02 +0200
User-agent: Thunderbird (Windows/20090812)

Timo VJ Lähde wrote:
No, but it makes possible to use _winstart as entrypoint directly without runtime library.

You are repeating yourself.

--- grischka

----- Original Message ----- From: "grischka" <address@hidden>
To: <address@hidden>
Sent: Friday, April 02, 2010 12:43 PM
Subject: Re: [Tinycc-devel] Win32: TinyC subsystem GUI

Timo VJ Lähde wrote:
If i compile test-gui.c with this commandline:
tcc.exe test-gui.c -nostdlib -Wl,--subsystem,gui

test-gui.exe is still commandline program PE_EXE and
it does not follow pe.subsystem value that should be 2 PE_GUI
and should use _winstart startpoint.

Well, maybe the "-Wl,--subsystem,gui" switch does not work, but how
does the patch below fix this?

--- grischka

--- test-gui.c ---
int _winstart(void)
return 0;
With this patch it's possible to use _winstart without runtime libraries:
tcc.exe test-gui.c -nostdlib
--- a\tccpe.c Thu Jan 14 22:00:04 2010
+++ b\tccpe.c Wed Mar 10 19:29:23 2010
@@ -1730,7 +1730,8 @@
    unsigned long addr = 0;
    int pe_type = 0;

-    if (find_elf_sym(symtab_section, PE_STDSYM("WinMain","@16")))
+    if (find_elf_sym(symtab_section, PE_STDSYM("WinMain","@16"))
+        || find_elf_sym(symtab_section, "_winstart"))
        pe_type = PE_GUI;
    if (TCC_OUTPUT_DLL == s1->output_type) {

reply via email to

[Prev in Thread] Current Thread [Next in Thread]