1 //===- Writer.h -------------------------------------------------*- C++ -*-===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #ifndef LLD_MACHO_WRITER_H 10 #define LLD_MACHO_WRITER_H 11 12 #include <cstdint> 13 14 namespace lld { 15 namespace macho { 16 17 class OutputSection; 18 19 class LoadCommand { 20 public: 21 virtual ~LoadCommand() = default; 22 virtual uint32_t getSize() const = 0; 23 virtual void writeTo(uint8_t *buf) const = 0; 24 }; 25 26 void writeResult(); 27 28 void createSyntheticSections(); 29 30 extern OutputSection *firstTLVDataSection; 31 32 } // namespace macho 33 } // namespace lld 34 35 #endif 36