What is gcc -s option?
dirk.heinrichs at nokia.com
Thu Jan 9 23:27:18 PST 2003
Am Donnerstag, 9. Januar 2003 13:06 schrieb ext Bill's LFS Login:
> On Thu, 9 Jan 2003, Albert Wagner wrote:
> > On Thursday 09 January 2003 5:40 am, Tushar Teredesai wrote:
> > > Albert Wagner wrote:
> > <sniip>
> > > <snip>
> > Ah. So the man page is incomplete. Thank you.
> > ><snip>
> Folks! Do not forget that gcc passes parameters to the linker. Any
> parameter not a compiler option is passed to the link editor, ld. Check
> man ld and you will see your -s option, along with -l and many other
> things you recognoze that gcc doesn't include in its man pages.
Many people just don't know that, so why not write -Wl,-s instead of just
-s. Everyone can find -Wl in man gcc and people (especially newbies) are
I've also run into problems with -s and -S, because both are ld options to
strip symbols, but -S is a gcc option (to stop after assembly) and is thus
not passed to ld. So if one wants to strip _debug_ symbols only, (s)he has
to use -Wl,-S anyway.
Dirk Heinrichs | Tel: +49 (0)211 47068 182
Configuration Manager | Fax: +49 (0)211 47068 111
Cap Gemini Ernst & Young| Mail: dirk.heinrichs at cgey.com
Hambornerstraße 55 | Web: http://www.cgey.com
D-40472 Düsseldorf | ICQ#: 110037733
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message
More information about the lfs-support