Path: utzoo!attcan!uunet!mcvax!hp4nl!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.sys.atari.st Subject: Re: Strange '-s' flag behavior in the GNU linker ? Summary: '-s' means: strip Message-ID: <807@philmds.UUCP> Date: 16 Sep 88 10:34:39 GMT References: <8809150858.AA16391@ucbvax.Berkeley.EDU> Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 29 In article <8809150858.AA16391@ucbvax.Berkeley.EDU> VBRANDT@DBNUAMA1.BITNET writes: > > I have found what is not quite a bug, but a somewhat annoying feature in the >GNU C linker. It seems that the '-s' flag does exactly the opposite of what I >think it should do. If you don't specify '-s', the linker appends a symbol >table to the executable, if you do specify it, no symbol table is produced. '-s' does not stand for symbol / no symbol, but for strip. This option is passed to the loader, and means: strip off the symbol table. The default in Unix is to have a symbol table in your executable (so the debuggers are not too bad to work with, although -g is preferred if you want to use dbx). > This means that to make executables without symbol tables, one cannot use >GCC, but has to invoke everything manually. Also, all the executables from >the GNU package themselves have quite big symbol tables. Removing them would >save several KB, which might help people suffering from storage/memory >shortages. I do not quite understand your problem. Put the -s in your makefile, or add -s to CFLAGS. Now you can invoke make with no special parameters. As for removing symbol tables, that's a job for strip(1); no doubt there'll be an ST version soon (if it isn't already there). > Anyway, thanks to John for his impressive work ! I fully agree. Leo.