Monday, 20 September 2004

Solaris/S1S9: Scope of Symbols - Adv/Disadv of GLOB scope

Advantages of global scope:



1) Easy to use interposing libraries

2) No worries about the application during run-time; if the run-time linker finds the right set of symbols, the application works just fine

3) No need for special mechanisms like linker map files or special compiler flags to make the symbols global in scope



Disadvantages of global scope:

1) Chance of namespace collisions with 3rd party libraries

2) Run-time performance will be a little slow because of the i-cache miss% & #page faults

3) Chance of accidental/malicious interposition of global symbols

4) Can't restrict functionality available to external objects

5) size of the application binary will be big compared to the binaries with reduced symbol scopes

6) Application symbols will be exposed through static/dynamic symbol tables



More disadvantages than advantages, huh! How to overcome the disadvantages of the default scope?

No comments:

Post a Comment