brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 066a0fd Raw
41 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLD_MACHO_WRITER_H10#define LLD_MACHO_WRITER_H11 12#include <cstdint>13 14namespace lld::macho {15 16class OutputSection;17class InputSection;18class Symbol;19 20class LoadCommand {21public:22  virtual ~LoadCommand() = default;23  virtual uint32_t getSize() const = 0;24  virtual void writeTo(uint8_t *buf) const = 0;25};26 27template <class LP> void writeResult();28void resetWriter();29 30void createSyntheticSections();31 32// Add bindings for symbols that need weak or non-lazy bindings.33void addNonLazyBindingEntries(const Symbol *, const InputSection *,34                              uint64_t offset, int64_t addend = 0);35 36extern OutputSection *firstTLVDataSection;37 38} // namespace lld::macho39 40#endif41