Path: blob/main/contrib/llvm-project/lld/MachO/MachOStructs.h
34870 views
//===- MachOStructs.h -------------------------------------------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file defines structures used in the MachO object file format. Note that9// unlike llvm/BinaryFormat/MachO.h, the structs here are defined in terms of10// endian- and alignment-compatibility wrappers.11//12//===----------------------------------------------------------------------===//1314#ifndef LLD_MACHO_MACHO_STRUCTS_H15#define LLD_MACHO_MACHO_STRUCTS_H1617#include "llvm/Support/Endian.h"1819namespace lld::structs {2021struct nlist_64 {22llvm::support::ulittle32_t n_strx;23uint8_t n_type;24uint8_t n_sect;25llvm::support::ulittle16_t n_desc;26llvm::support::ulittle64_t n_value;27};2829struct nlist {30llvm::support::ulittle32_t n_strx;31uint8_t n_type;32uint8_t n_sect;33llvm::support::ulittle16_t n_desc;34llvm::support::ulittle32_t n_value;35};3637struct entry_point_command {38llvm::support::ulittle32_t cmd;39llvm::support::ulittle32_t cmdsize;40llvm::support::ulittle64_t entryoff;41llvm::support::ulittle64_t stacksize;42};4344} // namespace lld::structs4546#endif474849