摘要 |
One embodiment of the present invention provides a system that uses a shared library to facilitate sharing objects containing metadata. During operation, the system receives identifiers for a set of objects to be included in the shared library. Next, the system generates a shared library containing the set of objects. In doing so, the system configures a symbol table within the shared library to include an identifier for each object. The system then installs the shared library in a file system, and configures the file system so that the shared library file can be accessed through a set of symbolic names, wherein each object is associated with a different symbolic name. This allows each object in the shared library to be referenced through its own symbolic name. Note that the present invention uses the shared library mechanism in a manner which differs from its typical use (sharing compiled, executable code). In order to avoid generating a shared library for each metadata object, the present invention places many such items together in one shared library. The names of these metadata objects are subsequently used as symbolic names of the file containing the shared library.
|