#ifndef LLD_MACHO_INPUT_SECTION_H
#define LLD_MACHO_INPUT_SECTION_H
#include "Config.h"
#include "Relocations.h"
#include "Symbols.h"
#include "lld/Common/LLVM.h"
#include "lld/Common/Memory.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/CachedHashString.h"
#include "llvm/ADT/TinyPtrVector.h"
#include "llvm/BinaryFormat/MachO.h"
namespace lld {
namespace macho {
class InputFile;
class OutputSection;
class InputSection { … };
class ConcatInputSection final : public InputSection { … };
ConcatInputSection *makeSyntheticInputSection(StringRef segName,
StringRef sectName,
uint32_t flags = 0,
ArrayRef<uint8_t> data = { … };
inline bool shouldOmitFromOutput(InputSection *isec) { … }
inline bool isCoalescedWeak(InputSection *isec) { … }
struct StringPiece { … };
static_assert …;
class CStringInputSection final : public InputSection { … };
class WordLiteralInputSection final : public InputSection { … };
inline uint8_t sectionType(uint32_t flags) { … }
inline bool isZeroFill(uint32_t flags) { … }
inline bool isThreadLocalVariables(uint32_t flags) { … }
inline bool isThreadLocalData(uint32_t flags) { … }
inline bool isDebugSection(uint32_t flags) { … }
inline bool isWordLiteralSection(uint32_t flags) { … }
bool isCodeSection(const InputSection *);
bool isCfStringSection(const InputSection *);
bool isClassRefsSection(const InputSection *);
bool isSelRefsSection(const InputSection *);
bool isEhFrameSection(const InputSection *);
bool isGccExceptTabSection(const InputSection *);
extern std::vector<ConcatInputSection *> inputSections;
extern int inputSectionsOrder;
namespace section_names {
constexpr const char authGot[] = …;
constexpr const char authPtr[] = …;
constexpr const char binding[] = …;
constexpr const char bitcodeBundle[] = …;
constexpr const char cString[] = …;
constexpr const char cfString[] = …;
constexpr const char cgProfile[] = …;
constexpr const char chainFixups[] = …;
constexpr const char codeSignature[] = …;
constexpr const char common[] = …;
constexpr const char compactUnwind[] = …;
constexpr const char data[] = …;
constexpr const char debugAbbrev[] = …;
constexpr const char debugInfo[] = …;
constexpr const char debugLine[] = …;
constexpr const char debugStr[] = …;
constexpr const char debugStrOffs[] = …;
constexpr const char ehFrame[] = …;
constexpr const char gccExceptTab[] = …;
constexpr const char export_[] = …;
constexpr const char dataInCode[] = …;
constexpr const char functionStarts[] = …;
constexpr const char got[] = …;
constexpr const char header[] = …;
constexpr const char indirectSymbolTable[] = …;
constexpr const char initOffsets[] = …;
constexpr const char const_[] = …;
constexpr const char lazySymbolPtr[] = …;
constexpr const char lazyBinding[] = …;
constexpr const char literals[] = …;
constexpr const char moduleInitFunc[] = …;
constexpr const char moduleTermFunc[] = …;
constexpr const char nonLazySymbolPtr[] = …;
constexpr const char objcCatList[] = …;
constexpr const char objcClassList[] = …;
constexpr const char objcMethList[] = …;
constexpr const char objcClassRefs[] = …;
constexpr const char objcConst[] = …;
constexpr const char objCImageInfo[] = …;
constexpr const char objcStubs[] = …;
constexpr const char objcSelrefs[] = …;
constexpr const char objcMethname[] = …;
constexpr const char objcNonLazyCatList[] = …;
constexpr const char objcNonLazyClassList[] = …;
constexpr const char objcProtoList[] = …;
constexpr const char outlinedHashTree[] = …;
constexpr const char pageZero[] = …;
constexpr const char pointers[] = …;
constexpr const char rebase[] = …;
constexpr const char staticInit[] = …;
constexpr const char stringTable[] = …;
constexpr const char stubHelper[] = …;
constexpr const char stubs[] = …;
constexpr const char swift[] = …;
constexpr const char symbolTable[] = …;
constexpr const char textCoalNt[] = …;
constexpr const char text[] = …;
constexpr const char threadPtrs[] = …;
constexpr const char threadVars[] = …;
constexpr const char unwindInfo[] = …;
constexpr const char weakBinding[] = …;
constexpr const char zeroFill[] = …;
constexpr const char addrSig[] = …;
}
void addInputSection(InputSection *inputSection);
}
std::string toString(const macho::InputSection *);
}
#endif