4 // Author: Phil Mesnier
9 // Obj_Module encapsulates the result of applying nm to a single object module
10 // in a shared library. Currently an object module consists of two types of
11 // signatures, those that are exported, able to resolve references from others,
12 // and those that are imported, needing resolution.
14 // Obj_Modules keep track of external references. In the end, any module that
15 // has one or more external references to it must be included in the resulting
16 // library. While the means exists to remove external references, perhaps
17 // through further analysis of undefined signatures and their usage, this is
18 // not currently done. Once a technique is discovered to allow for easy
19 // determination that reference is truly unneeded this code may be useful.
23 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
24 class ACE_Message_Block
;
25 ACE_END_VERSIONED_NAMESPACE_DECL
29 Obj_Module ( const ACE_CString
&, int = 500);
31 // Returns the list of exported signatures, ie. those that are defined in
35 // Returns the list of signatures used by this module but not defined within
38 // Returns the name of the object module.
41 // Add_source invokes GNU nm on the supplied file and parses the output to
42 // build the list of imported and exported signatures. When replacing GNU
43 // nm to use a different tool, this method must be modified. In the future
44 // this could be a virtual to allow for specialization based on toolset.
45 void add_source (const char *, int = 0);
47 // Get the number of external references to this object module. At the end
48 // of processing, if the number of external references is 0, the module is
49 // not included in the final library.
52 // add a new external reference to this module.
55 // remove an exterenal reference. Currently, this function is not used.
59 void populate_sig_list (Sig_List
&, int , ACE_Message_Block
*);
60 int read_line (ACE_HANDLE src
, ACE_Message_Block
**buf
);
68 #endif /* _OBJ_MODULE_H_ */