public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* linker option -s
@ 2003-11-28 16:50 Oliver Lange
  2003-11-29  3:15 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Lange @ 2003-11-28 16:50 UTC (permalink / raw)
  To: gcc-help


Hello everyone,

I found a link to this mailing list at

http://www.gnu.org/software/gcc/gcc.html

but i don't know how to subscribe to the list, so i can't read
answers within the list.

I'd just like to see a better documentation for the linker option
'-s' in future versions of the manual. The current single-line
description is, however, unsufficient. Removing 'relocation information'
could be misunderstood as removing 'reloc tables', which would make
an executable unloadable, which is in fact not true. I wonder if
I could use this option when linking a dynamic library - can applications
still find library functions if a lib was linked using -s ?
And what kinda symbols are removed ? I still have absolutely no clue
what this option is exactly doing, but i'm using it by default..

Have a nice day..


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: linker option -s
  2003-11-28 16:50 linker option -s Oliver Lange
@ 2003-11-29  3:15 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 2003-11-29  3:15 UTC (permalink / raw)
  To: Oliver Lange; +Cc: gcc-help

Oliver Lange <bloodrock@bloody.in-berlin.de> writes:

> I found a link to this mailing list at
> 
> http://www.gnu.org/software/gcc/gcc.html
> 
> but i don't know how to subscribe to the list, so i can't read
> answers within the list.

See http://gcc.gnu.org/lists.html

> I'd just like to see a better documentation for the linker option
> '-s' in future versions of the manual. The current single-line
> description is, however, unsufficient. Removing 'relocation information'
> could be misunderstood as removing 'reloc tables', which would make
> an executable unloadable, which is in fact not true. I wonder if
> I could use this option when linking a dynamic library - can applications
> still find library functions if a lib was linked using -s ?
> And what kinda symbols are removed ? I still have absolutely no clue
> what this option is exactly doing, but i'm using it by default..

In the linker manual the -s option has a different one line
description: ``Omit all symbol information from the output file.''

The -s option strips the normal symbol table and the debugging
information, but not the dynamic symbol table or the dynamic relocs.
As you say, stripping the dynamic information would make it impossible
to run the executable.  I think it would work to use -s when creating
a shared library.

Ian

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-11-29  3:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-28 16:50 linker option -s Oliver Lange
2003-11-29  3:15 ` Ian Lance Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).