tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] Win32: PE subsystem patch proposal


From: Timo VJ Lähde
Subject: [Tinycc-devel] Win32: PE subsystem patch proposal
Date: Thu, 8 Apr 2010 12:31:33 +0300

Is this usable Win32: PE subsystem patch:

- if _winstart found pe_type = PE_GUI;
- if linker option subsystem is set use it. Example -Wl,subsystem,gui
What else should check ?
-----------------------------------------------------------------------------------------------
--- a\tccpe.c Tue Apr 06 22:53:16 2010
+++ b\tccpe.c Thu Apr 08 12:16:22 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;
    else
    if (TCC_OUTPUT_DLL == s1->output_type) {
@@ -1740,6 +1741,9 @@
    }
    else
        pe_type = PE_EXE;
+    if (s1->pe_subsystem) {
+        pe_type = s1->pe_subsystem;
+    }

    start_symbol =
        TCC_OUTPUT_MEMORY == s1->output_type
Win32: PE subsystem patch

-----------------------------------------------------------------------------------------------





reply via email to

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