Re: -Wl,--as-needed considered possibly harmful
Le Sunday 09 December 2007 22:45:46 Nikita V. Youshchenko, vous avez écrit :
> > However, most of the applications don't need to link against theora and
> > speex.
> Doesn't libshout reference symbols from libspeex and libtheora?
> If it does, resulting binary must be linked against both these libraries.
> Unresolved symbols within binaries are really bad, because they will once
> be unexpectedly called (e.g. in some init or deinit or error-handling), and
> binary will crash, leaving user data unsaved.
I think you are confusing the issue.
Yes, libshout uses symbols from libspeex:
objdump -x /usr/lib/libshout.so | grep NEEDED | grep speex
However, not all applications uses those symbols in their current code, so
they do not need to be linked against speex themselves.
Of course, correct dependencies will be pulled when requesting libshout.