Thanks for the information, it is quite helpful.  It seems my approach
so far is a start, but more definitely needs to be done to filter out
the internally-used symbols.  A good result would be a shell script
that automates all the details below and returns a few thousand symbols
as canidates for removal.  If it works, then the script could be
occasionally run against the code base as a way to check code growth.

Matt

--- Jens-Heiner Rechtien <[EMAIL PROTECTED]> wrote:

> Hi Matt,
> 
> your approach is flawed in the way that a symbol which is defined
> *and* used in one shared library is not flagged "UNDEF" in this 
> library, but still be exported from the library if it's possibly used
> elsewhere. Thus you get a lot of exported symbols without equivalent 
> "UNDEF" for shared  library internal stuff.
> 
> This is an unfortunate consequence of the C++ standard which has no 
> concept of shared library "internal" classes/methods/functions.
> 
> We do something about this: Please look for all the *_DLLPUBLIC and 
> *_DLLPRIVATE macros in our headers. These macros use non standard 
> compiler extensions to mark symbols as "public" or "hidden". "Hidden"
> 
> symbols will not be exported from a shared library. This has at least
> 
> three benefits: a better API definition (think of encapsulation), 
> smaller binaries and last not least better startup performance
> because relocations are cheaper if direct binding can be used.
> 
> There is a great paper about the working of shared libraries by
> Ulrich Drepper: http://people.redhat.com/drepper/dsohowto.pdf
> 
> We probably got quite a bit of dead code in OOo but it is not easily 
> found. I think the best approach would be to do some extensive
> coverage studies, identify possibly dead code, use a cross referencer
> to find all 
> references whrere a symbol is used and determine if this is also dead
> 
> code. The call to remove the dead code must then be made by the 
> responsible developer, only he/she can tell if that symbol may not 
> possibly be referenced by some code outside OOo (ie a third party 
> component).
> 
> HTH,
>    Heiner
> 
> 



                
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to