llvm/lld/MachO/OutputSegment.h

//===- OutputSegment.h ------------------------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef LLD_MACHO_OUTPUT_SEGMENT_H
#define LLD_MACHO_OUTPUT_SEGMENT_H

#include "OutputSection.h"
#include "Symbols.h"
#include "lld/Common/LLVM.h"
#include "llvm/ADT/TinyPtrVector.h"

#include <limits>
#include <vector>

namespace lld::macho {

namespace segment_names {

constexpr const char dataConst[] =;
constexpr const char dataDirty[] =;
constexpr const char data[] =;
constexpr const char dwarf[] =;
constexpr const char import[] =;
constexpr const char ld[] =; // output only with -r
constexpr const char linkEdit[] =;
constexpr const char llvm[] =;
constexpr const char pageZero[] =;
constexpr const char textExec[] =;
constexpr const char text[] =;

} // namespace segment_names

class OutputSection;
class InputSection;

class OutputSegment {};

extern std::vector<OutputSegment *> outputSegments;

void sortOutputSegments();
void resetOutputSegments();

OutputSegment *getOrCreateOutputSegment(StringRef name);

} // namespace lld::macho

#endif