1 /*****************************************************************************/
5 /* Module constructor/destructor support */
9 /* (C) 2000-2012, Ullrich von Bassewitz */
10 /* Roemerstrasse 52 */
11 /* D-70794 Filderstadt */
12 /* EMail: uz@cc65.org */
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 /*****************************************************************************/
46 /*****************************************************************************/
48 /*****************************************************************************/
56 /*****************************************************************************/
58 /*****************************************************************************/
62 /* Order of the tables */
64 cdIncreasing, /* Increasing priority - default */
65 cdDecreasing /* Decreasing priority */
68 /* Data for a forced condes import */
69 typedef struct ConDesImport ConDesImport;
71 unsigned Name; /* Name of the import */
72 FilePos Pos; /* Position of import in the config file */
73 unsigned AddrSize; /* Address size of the symbol */
78 /*****************************************************************************/
80 /*****************************************************************************/
84 void ConDesAddExport (struct Export* E);
85 /* Add the given export to the list of constructors/destructor */
87 void ConDesSetSegName (unsigned Type, unsigned SegName);
88 /* Set the segment name where the table should go */
90 const ConDesImport* ConDesGetImport (unsigned Type);
91 /* Get the forced import for the given ConDes type. Returns NULL if there is
92 ** no forced import for this type.
95 void ConDesSetImport (unsigned Type, const ConDesImport* Import);
96 /* Set the forced import for the given ConDes type */
98 void ConDesSetLabel (unsigned Type, unsigned Name);
99 /* Set the label for the given ConDes type */
101 void ConDesSetCountSym (unsigned Type, unsigned Name);
102 /* Set the name for the given ConDes count symbol */
104 void ConDesSetOrder (unsigned Type, ConDesOrder Order);
105 /* Set the sorting oder for the given ConDes table */
107 int ConDesHasSegName (unsigned Type);
108 /* Return true if a segment name is already defined for this ConDes type */
110 int ConDesHasLabel (unsigned Type);
111 /* Return true if a label is already defined for this ConDes type */
113 void ConDesCreate (void);
114 /* Create the condes tables if requested */
116 void ConDesDump (void);
117 /* Dump ConDes data to stdout for debugging */
121 /* End of condes.h */