What is gcc -s option?

Bill's LFS Login lfsbill at wlmcs.com
Thu Jan 9 14:51:55 PST 2003

On Thu, 9 Jan 2003, Dan Osterrath wrote:

> Hash: SHA1
> > Apples and oranges. You are speaking of the strip command. The OP was
> > <snip>

> meaning but do not have the same effect.
> I think "ld -s" does not relly strip all symbols as my libraries are all
> compiled with -s and they work fine. A "strip -s" in the library directories
> would create some kind of insomnia to me. ;-)
> Although "ld -S" and "strip -S" should do the same.
> Some kind of inconsistence...

Whew! I thought all my compiles worked OK too! I guess I can avoid all
that reading for now, though my soul would probably benefit from it. :)

The proof of the differing behaviour can be seen (I think) in running nm
on dynamic executables and libs. We should be able to still see entry poin
names, external variable names and so on, even on ones with 'gcc -s'

BTW, if making object modules *only*, I bet the 'gcc -s' would make those
object files non-linkable? IOW, if we tried to just link a bunch of
objects together (meaning they are input to the linker a second time)
after originally making them with 'gcc -s', I *suspect* they would fail to
link properly because of missing but needed (for resolution) symbols.


Bill Maltby
lfsbill at wlmcs.com

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 mailing list