From: fjh@cs.mu.OZ.AU (Fergus Henderson)
Subject: Re: linking stripped object files
3 Mar 1997 03:29:51 -0800
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <199703030759.SAA32338.cygnus.gnu-win32@murlibobo.cs.mu.OZ.AU>
Content-Type: text
Original-To: cheekai@gen.co.jp (Chin Chee-Kai)
Original-Cc: gnu-win32@cygnus.com (gnu-win32)
In-Reply-To: <Pine.3.07.9703031328.A26771-a100000@sumimasen.gen.co.jp> from "Chin Chee-Kai" at Mar 3, 97 01:35:29 pm
X-Mailer: ELM [version 2.4 PL24]
Original-Sender: owner-gnu-win32@cygnus.com

Chin Chee-Kai, you wrote:
> 
> Suppose now I do this (which works on Unix, producing an executable
> that does not have debugging information):
> 	rm -f a.exe
> 	strip *.o
> 	gcc -g 1.o 2.o 3.o

Which Unix does this work on?

It doesn't work on Linux or Alpha/OSF.

On Alpha/OSF, the `strip' command reports the following:
	strip: Error: 1.o contains relocation entries-- not stripped

On Linux, you just get 

	undefined symbol `main'

or something like that.

> I get:
> C:\CYGNUS\H-I386-CYGWIN32\lib\gcc-lib\i386-cygwin32/cygnus-2.7.2-961023/\
> ../../../../i386-cygwin32/lib/libcygwin.a(libcmain.o): In function `main':
> /pizza/mushroom/noer/beta17/src/winsup/libcmain.cc:30: undefined reference \
> to `WinMain@16'

That's because `strip' stripped off all the symbols including the
`main' symbol in your `.o' file.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
