ld: Write types into TPI stream of PDB
[binutils-gdb.git] / ld / deffile.h
index 8ddd070e2151c72347e90eb40505d889c551a5f3..9eb08ad83fb712c11d28b75470246806b443adff 100644 (file)
@@ -1,6 +1,5 @@
 /* deffile.h - header for .DEF file parser
-   Copyright 1998, 1999, 2000, 2002, 2003, 2005, 2006, 2007, 2009
-   Free Software Foundation, Inc.
+   Copyright (C) 1998-2022 Free Software Foundation, Inc.
    Written by DJ Delorie dj@cygnus.com
 
    This file is part of the GNU Binutils.
@@ -35,7 +34,7 @@ typedef struct def_file_section {
 typedef struct def_file_export {
   char *name;                  /* always set */
   char *internal_name;         /* always set, may == name */
-  char *its_name;              /* optional export table name refered to. */
+  char *its_name;              /* optional export table name referred to. */
   int ordinal;                 /* -1 if not specified */
   int hint;
   char flag_private, flag_constant, flag_noname, flag_data, flag_forward;
@@ -51,7 +50,7 @@ typedef struct def_file_import {
   char *internal_name;         /* always set */
   def_file_module *module;     /* always set */
   char *name;                  /* may be NULL; either this or ordinal will be set */
-  char *its_name;              /* optional import table name refered to. */
+  char *its_name;              /* optional import table name referred to. */
   int ordinal;                 /* may be -1 */
   int data;                    /* = 1 if data */
 } def_file_import;
@@ -62,6 +61,10 @@ typedef struct def_file_aligncomm {
   unsigned int alignment;      /* log-2 alignment.        */
 } def_file_aligncomm;
 
+typedef struct def_file_exclude_symbol {
+  char *symbol_name;           /* Name of excluded symbol.  */
+} def_file_exclude_symbol;
+
 typedef struct def_file {
   /* From the NAME or LIBRARY command.  */
   char *name;
@@ -81,6 +84,7 @@ typedef struct def_file {
 
   /* From the EXPORTS commands.  */
   int num_exports;
+  unsigned int max_exports;
   def_file_export *exports;
 
   /* Used by imports for module names.  */
@@ -88,6 +92,7 @@ typedef struct def_file {
 
   /* From the IMPORTS commands.  */
   int num_imports;
+  unsigned int max_imports;
   def_file_import *imports;
 
   /* From the VERSION command, -1 if not specified.  */
@@ -96,6 +101,10 @@ typedef struct def_file {
   /* Only expected from .drectve sections, not .DEF files.  */
   def_file_aligncomm *aligncomms;
 
+  /* From EXCLUDE_SYMBOLS or embedded directives. */
+  unsigned int num_exclude_symbols, max_exclude_symbols;
+  def_file_exclude_symbol *exclude_symbols;
+
 } def_file;
 
 extern def_file *def_file_empty (void);
@@ -105,10 +114,20 @@ extern def_file *def_file_parse (const char *, def_file *);
 extern void def_file_free (def_file *);
 extern def_file_export *def_file_add_export (def_file *, const char *,
                                             const char *, int,
-                                            const char *);
+                                            const char *, bool *);
 extern def_file_import *def_file_add_import (def_file *, const char *,
                                             const char *, int, const char *,
-                                            const char *);
+                                            const char *, bool *);
+extern int def_file_add_import_from (def_file *fdef,
+                                    int num_imports,
+                                    const char *name,
+                                    const char *module,
+                                    int ordinal,
+                                    const char *internal_name,
+                                    const char *its_name);
+extern def_file_import *def_file_add_import_at (def_file *, int, const char *,
+                                               const char *, int, const char *,
+                                               const char *);
 extern void def_file_add_directive (def_file *, const char *, int);
 extern def_file_module *def_get_module (def_file *, const char *);
 #ifdef DEF_FILE_PRINT