+unsigned GetSymExportId (const SymEntry* S)
+/* Return the export id for the given symbol */
+{
+ PRECONDITION (S != 0 && (S->Flags & SF_EXPORT) && S->ExportId != ~0U);
+ return S->ExportId;
+}
+
+
+
+unsigned GetSymInfoFlags (const SymEntry* S, long* ConstVal)
+/* Return a set of flags used when writing symbol information into a file.
+ * If the SYM_CONST bit is set, ConstVal will contain the constant value
+ * of the symbol. The result does not include the condes count.
+ * See common/symdefs.h for more information.
+ */
+{
+ /* Setup info flags */
+ unsigned Flags = 0;
+ Flags |= SymIsConst (S, ConstVal)? SYM_CONST : SYM_EXPR;
+ Flags |= (S->Flags & SF_LABEL)? SYM_LABEL : SYM_EQUATE;
+ Flags |= (S->Flags & SF_LOCAL)? SYM_CHEAP_LOCAL : SYM_STD;
+ if (S->Flags & SF_EXPORT) {
+ Flags |= SYM_EXPORT;
+ }
+ if (S->Flags & SF_IMPORT) {
+ Flags |= SYM_IMPORT;
+ }
+
+ /* Return the result */
+ return Flags;
+}
+
+
+