Name: Anonymous 2009-11-10 4:15
What do you want in the next C standard? For me it's namespaces, damn they make libraries simple.
~% echo 'int hi(){puts("hello world");return 0;}' > test.c
~% i486-mingw32-gcc -Os -fomit-frame-pointer -c test.c
~% i486-mingw32-ld -s -O -init=hi test.o -lmsvcrt -o test.exe
~% wc -c test.exe
2048 test.exe
~% wine test.exe
hello worldD:\Documents and Settings\konata\Desktop>cl /MD /Os /O1 test.c /link /align:4096 /filealign:512 /entry:hi /subsystem:console
t /stub:stub64.exe
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
test.c
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
/out:test.exe
/align:4096
/filealign:512
/entry:hi
/subsystem:console
/merge:.rdata=.text
/merge:.data=.text
/stub:stub64.exe
test.obj
stub64.exe : warning LNK4060: stub file missing full MS-DOS header; rebuild stub with /KNOWEAS 16-bit LINK option
LINK : warning LNK4108: /ALIGN specified without /DRIVER or /VXD; image may not run
LINK : warning LNK4078: multiple ".text" sections found with different attributes (40000040)
LINK : warning LNK4078: multiple ".text" sections found with different attributes (C0000040)
D:\Documents and Settings\konata\Desktop>wc -c test.exe
1024 test.exe
D:\Documents and Settings\konata\Desktop>test
hello world