Download presentation
Presentation is loading. Please wait.
1
Using Shared Libraries
The traditional way Is code equals to code? Some words about configuration. Benefits
2
The traditional way - comparison
The past: 1 Executable Many object files/libraries, all linked into one executable at link time Gaudi: Very few object files/libraries linked in Process aquires it’s “personality” at run-time Dynamic linkage of images Execution of code within these images GAUDI M.Frank LHCb/CERN
3
Is Code equals to code? Usually most of the code is never executed
Why carry the useless ballast with you? Example(s): Why link against Objy implementation, if I just want to copy a few events with ROOT to work at home? Why should a link after fixing a bug in a module? Why should I always link against reconstruction code, if it is unclear wether it will be ever called? The dependencies grow and grow and grow Lean component modules tend to have manageable dependencies GAUDI M.Frank LHCb/CERN
4
What type of code exists?
Static libraries Code to be duplicated for each image Code which is aware of running in an executable or a shared image: Gaudi System class FactoryTable (wait for next slides) Basic Bootstrap IIDs, CLIDs, … GAUDI M.Frank LHCb/CERN
5
What type of code exists?
Implicitly linked libraries Equivalent to tradition shared libraries Public implementation code All symbols are exported Base classes e.g. Converter, Service, ConversionSvc, MsgStream,… GAUDI M.Frank LHCb/CERN
6
What type of code exists?
Explicitly linked libraries Loaded on demand using LoadLibrary(), dlopen(),… Component libraries Private implementation code No symbols are exported objdump -> no output (unless --dynamic-syms) Single entry point extern “C” std::list<const IFactory&>& getFactoryEntries() Access to all implemented factories GAUDI M.Frank LHCb/CERN
7
Benefits Process depends on configuration Modules become manageable
PATH LD_LIBRARY_PATH Modules become manageable Minimize dependencies Upgrades are simple No link step is involved Efficient use of resources GAUDI M.Frank LHCb/CERN
8
Side Remarks Macros: GaudiDllCall, GaudiDllData, … used to export code on NT are gone Analyse archive library file directly: xdfol.exe Explicitly generate file with transfer vectors Fortran Shared libraries may not have unresolved refs to F77 code Force link into executable DLLs use routine pointers filled at image activation by analysing invoking executable file GAUDI M.Frank LHCb/CERN
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.