From: ian AT cygnus DOT com (Ian Lance Taylor) Subject: Re: Smallest program 5 Dec 1996 16:31:59 -0800 Sender: daemon AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <9612052355.AA28739.cygnus.gnu-win32@tweedledumb.cygnus.com> References: Original-To: sandrof AT microsoft DOT com Original-Cc: gnu-win32 AT cygnus DOT com Original-Sender: owner-gnu-win32 AT cygnus DOT com In cygnus.gnu-win32 sandrof AT microsoft DOT com (Alessandro Forin) writes: >>Sent: Wednesday, December 04, 1996 2:30 PM >>To: Alessandro Forin; Visual C++ Special Interest Group >>Subject: RE: Size of smallest program >> >>[ Thanks to <> for reminding me of the linker options - I knew they existed I >>just couldn't remember what they were ] >> >> cl /O2 /MD /GF hello.c /link /optidata /merge:.rdata=.text >> >>Gives an .exe size of 2048 bytes The GNU linker permits this sort of operation using a linker script. You can the default linker script by running ld --verbose. Capture the linker script portion in a file. Edit it. Pass it to the linker using the -T option. For more information about what the GNU linker is doing use the -M option to generate a linker map. Ian - For help on using this list, send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".