diff --git a/lld/ELF/AArch64ErrataFix.cpp b/lld/ELF/AArch64ErrataFix.cpp index e2c99767fad2..2dc1a61815d1 100644 --- a/lld/ELF/AArch64ErrataFix.cpp +++ b/lld/ELF/AArch64ErrataFix.cpp @@ -35,12 +35,13 @@ #include "AArch64ErrataFix.h" #include "Config.h" #include "LinkerScript.h" -#include "lld/Common/Memory.h" #include "OutputSections.h" #include "Relocations.h" #include "Strings.h" +#include "Symbols.h" #include "SyntheticSections.h" #include "Target.h" +#include "lld/Common/Memory.h" #include "llvm/Support/Endian.h" #include "llvm/Support/raw_ostream.h" diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp index d4f5c89d71e2..12466e00b46a 100644 --- a/lld/ELF/Driver.cpp +++ b/lld/ELF/Driver.cpp @@ -34,6 +34,7 @@ #include "ScriptParser.h" #include "Strings.h" #include "SymbolTable.h" +#include "Symbols.h" #include "SyntheticSections.h" #include "Target.h" #include "Writer.h" diff --git a/lld/ELF/GdbIndex.cpp b/lld/ELF/GdbIndex.cpp index e858a27bc06e..d27b57f95938 100644 --- a/lld/ELF/GdbIndex.cpp +++ b/lld/ELF/GdbIndex.cpp @@ -15,6 +15,7 @@ //===----------------------------------------------------------------------===// #include "GdbIndex.h" +#include "Symbols.h" #include "lld/Common/Memory.h" #include "llvm/DebugInfo/DWARF/DWARFDebugPubTable.h" #include "llvm/Object/ELFObjectFile.h" diff --git a/lld/ELF/ICF.cpp b/lld/ELF/ICF.cpp index ae10d4815577..09dac60c3193 100644 --- a/lld/ELF/ICF.cpp +++ b/lld/ELF/ICF.cpp @@ -76,6 +76,7 @@ #include "ICF.h" #include "Config.h" #include "SymbolTable.h" +#include "Symbols.h" #include "lld/Common/Threads.h" #include "llvm/ADT/Hashing.h" #include "llvm/BinaryFormat/ELF.h" diff --git a/lld/ELF/InputFiles.h b/lld/ELF/InputFiles.h index 4fb86f4e109e..865e38ac7a26 100644 --- a/lld/ELF/InputFiles.h +++ b/lld/ELF/InputFiles.h @@ -11,8 +11,6 @@ #define LLD_ELF_INPUT_FILES_H #include "Config.h" -#include "InputSection.h" -#include "Symbols.h" #include "lld/Common/ErrorHandler.h" #include "lld/Common/LLVM.h" @@ -40,6 +38,7 @@ class InputFile; namespace lld { namespace elf { class InputFile; +class InputSectionBase; } // Returns "", "foo.a(bar.o)" or "baz.o". diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 5daff1259ca1..737dc13ee70a 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -14,6 +14,7 @@ #include "LinkerScript.h" #include "OutputSections.h" #include "Relocations.h" +#include "Symbols.h" #include "SyntheticSections.h" #include "Target.h" #include "Thunks.h" diff --git a/lld/ELF/MapFile.cpp b/lld/ELF/MapFile.cpp index 8bf672be6fcf..dcc829315e64 100644 --- a/lld/ELF/MapFile.cpp +++ b/lld/ELF/MapFile.cpp @@ -25,6 +25,7 @@ #include "OutputSections.h" #include "Strings.h" #include "SymbolTable.h" +#include "Symbols.h" #include "SyntheticSections.h" #include "lld/Common/Threads.h" #include "llvm/Support/raw_ostream.h" diff --git a/lld/ELF/Relocations.cpp b/lld/ELF/Relocations.cpp index 13c3a4d55088..903629a44b53 100644 --- a/lld/ELF/Relocations.cpp +++ b/lld/ELF/Relocations.cpp @@ -47,6 +47,7 @@ #include "OutputSections.h" #include "Strings.h" #include "SymbolTable.h" +#include "Symbols.h" #include "SyntheticSections.h" #include "Target.h" #include "Thunks.h" diff --git a/lld/ELF/SymbolTable.h b/lld/ELF/SymbolTable.h index c4ad637e6a58..fa7c6a8d2918 100644 --- a/lld/ELF/SymbolTable.h +++ b/lld/ELF/SymbolTable.h @@ -18,6 +18,8 @@ namespace lld { namespace elf { +class Defined; +class SectionBase; // SymbolTable is a bucket of all known symbols, including defined, // undefined, or lazy symbols (the last one is symbols in archive diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index 527b7fbce1af..7a454505c384 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -22,6 +22,7 @@ #include "OutputSections.h" #include "Strings.h" #include "SymbolTable.h" +#include "Symbols.h" #include "Target.h" #include "Writer.h" #include "lld/Common/ErrorHandler.h" diff --git a/lld/ELF/SyntheticSections.h b/lld/ELF/SyntheticSections.h index a0fa8ca44c55..0be2a29b15cd 100644 --- a/lld/ELF/SyntheticSections.h +++ b/lld/ELF/SyntheticSections.h @@ -30,6 +30,7 @@ namespace lld { namespace elf { +class SharedSymbol; class SyntheticSection : public InputSection { public: diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 4ba25241e194..8c67780f5c8a 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -17,6 +17,7 @@ #include "Relocations.h" #include "Strings.h" #include "SymbolTable.h" +#include "Symbols.h" #include "SyntheticSections.h" #include "Target.h" #include "lld/Common/Memory.h"