2020-04-03 02:54:05 +08:00
|
|
|
//===- Writer.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_WRITER_H
|
|
|
|
#define LLD_MACHO_WRITER_H
|
|
|
|
|
2020-04-28 03:50:59 +08:00
|
|
|
#include <cstdint>
|
|
|
|
|
2020-04-03 02:54:05 +08:00
|
|
|
namespace lld {
|
|
|
|
namespace macho {
|
|
|
|
|
2020-04-28 03:50:59 +08:00
|
|
|
class LoadCommand {
|
|
|
|
public:
|
|
|
|
virtual ~LoadCommand() = default;
|
|
|
|
virtual uint32_t getSize() const = 0;
|
|
|
|
virtual void writeTo(uint8_t *buf) const = 0;
|
|
|
|
};
|
|
|
|
|
2020-04-03 02:54:05 +08:00
|
|
|
void writeResult();
|
|
|
|
|
2020-04-22 04:37:57 +08:00
|
|
|
void createSyntheticSections();
|
|
|
|
|
2020-04-03 02:54:05 +08:00
|
|
|
} // namespace macho
|
|
|
|
} // namespace lld
|
|
|
|
|
|
|
|
#endif
|