1 /*****************************************************************************/
5 /* Handle program external symbols for relocatable output formats */
9 /* (C) 1999 Ullrich von Bassewitz */
11 /* D-70597 Stuttgart */
12 /* EMail: uz@musoftware.de */
15 /* This software is provided 'as-is', without any expressed or implied */
16 /* warranty. In no event will the authors be held liable for any damages */
17 /* arising from the use of this software. */
19 /* Permission is granted to anyone to use this software for any purpose, */
20 /* including commercial applications, and to alter it and redistribute it */
21 /* freely, subject to the following restrictions: */
23 /* 1. The origin of this software must not be misrepresented; you must not */
24 /* claim that you wrote the original software. If you use this software */
25 /* in a product, an acknowledgment in the product documentation would be */
26 /* appreciated but is not required. */
27 /* 2. Altered source versions must be plainly marked as such, and must not */
28 /* be misrepresented as being the original software. */
29 /* 3. This notice may not be removed or altered from any source */
32 /*****************************************************************************/
41 /*****************************************************************************/
43 /*****************************************************************************/
47 /* Forward decl for structure holding an external symbol */
48 typedef struct ExtSym_ ExtSym;
50 /* External symbol table structure */
51 typedef struct ExtSymTab_ ExtSymTab;
55 /*****************************************************************************/
57 /*****************************************************************************/
61 ExtSym* NewExtSym (ExtSymTab* Tab, const char* Name);
62 /* Create a new external symbol and insert it into the list */
64 ExtSymTab* NewExtSymTab (void);
65 /* Create a new external symbol table */
67 void FreeExtSymTab (ExtSymTab* Tab);
68 /* Free an external symbol structure */
70 ExtSym* GetExtSym (const ExtSymTab* Tab, const char* Name);
71 /* Return the entry for the external symbol with the given name. Return NULL
72 * if there is no such symbol.
75 unsigned ExtSymCount (const ExtSymTab* Tab);
76 /* Return the number of symbols in the table */
78 const ExtSym* ExtSymList (const ExtSymTab* Tab);
79 /* Return the start of the symbol list sorted by symbol number. Call
80 * ExtSymNext for the next symbol.
83 unsigned ExtSymNum (const ExtSym* E);
84 /* Return the number of an external symbol */
86 const char* ExtSymName (const ExtSym* E);
87 /* Return the symbol name */
89 const ExtSym* ExtSymNext (const ExtSym* E);
90 /* Return the next symbol in the list */
94 /* End of extsyms.h */