diff --git a/lld/ELF/Config.h b/lld/ELF/Config.h index 7b820f18b8c7..c279b99b43c1 100644 --- a/lld/ELF/Config.h +++ b/lld/ELF/Config.h @@ -30,6 +30,10 @@ enum ELFKind { ELF64BEKind }; +// This struct contains the global configuration for the linker. +// Most fields are direct mapping from the command line options +// and such fields have the same name as the corresponding options. +// Most fields are initialized by the driver. struct Configuration { SymbolBody *EntrySym = nullptr; SymbolBody *MipsGpDisp = nullptr; @@ -76,6 +80,7 @@ struct Configuration { unsigned Optimize = 0; }; +// The only instance of Configuration struct. extern Configuration *Config; } // namespace elf2