xlib + xcms

Bill Crawford billcrawford1970 at gmail.com
Thu Mar 23 20:19:48 PST 2006


On Friday 24 March 2006 02:25, Enrico Weigelt wrote:

> hmm, is it usual to link in functions which are never called ?

 Sure, it's called "dead code."

 There's plenty of functions in [g]libc that I'll probably never call. Most 
libraries above the level of libc will have plenty of functions in that I 
never call. Should they all be removed?

 It's entirely possible for applications to have had code dealing with Xcms 
that just never got called. Entirely possible.

> Could anyone, who has access to a lot of older applications do
> an nm over them to see whether anyone links in these functions ?

 And if they're statically linked? ;)

> And is there any other source (yeah, I did not yet read the spec)
> where we could find out if anyone could rely on them ?

> #1:  specify a complete new library interface (with slightly
>      non-conflicting symbols, ie. by using some prefix).
> #2a: write a small wrapper which library which provides the new
>      interface (at least at source) and sits on top of old xlib
> #2b: write an separate, new, implementation outside of xlib

 And Alan already answered this one :)

> 3:   start porting new applications to the new interface.
>      they just ask pkg-config where they should link against, etc.

 And this is ... modular X libs.

> Okay, we maybe have a little bit of code duplication with that,

 Doesn't this sorta invalidate the whole argument about slimming things down?



More information about the xorg mailing list