Article View: comp.sys.atari.st
Article #34136Strange '-s' flag behavior in the GNU linker ?
From: John R. Dunning
Date: Sun, 18 Sep 1988 17:30
Date: Sun, 18 Sep 1988 17:30
32 lines
1945 bytes
1945 bytes
From: VBRANDT%DBNUAMA1.BITNET@CUNYVM.CUNY.EDU
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.
Well, I admit it's somewhat counter-intuitive, but the semantics of -s
is unchanged from what it was in the unhacked LD.C. Ie, the default
behaviour really is supposed to be to produce a symbol table. After
thinking about it, though, it seems reasonable to change it in the ST
version, as the ST format symbol tables are never useful.
This means that to make executables without symbol tables, one cannot use
GCC, but has to invoke everything manually.
That's not true. GCC passes the -s flag along if it's specified. (At
least it's supposed to; did I introduce a bug at the last minute?)
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.
Indeed. I'm pretty sure I built all the executables with -s (to GCC),
so if they've really got symbol tables, perhaps I did leave a bug in
there. I'll investigate tonight and post the results.
Anyway, thanks to John for his impressive work !
You're very welcome.
Technical Details
Message-ID:
<19880918173048.9.JRD@MOA.SCRC.Symbolics.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!ucsd!ucbvax!STONY-BROOK.SCRC.SYMBOLICS.COM!jrdShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!ucsd!ucbvax!STONY-BROOK.SCRC.SYMBOLICS.COM!jrd From: jrd@STONY-BROOK.SCRC.SYMBOLICS.COM (John R. Dunning) Newsgroups: comp.sys.atari.st Subject: Strange '-s' flag behavior in the GNU linker ? Message-ID: <19880918173048.9.JRD@MOA.SCRC.Symbolics.COM> Date: 18 Sep 88 17:30:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 32