summaryrefslogtreecommitdiff
path: root/lld/MachO/MachOStructs.h
diff options
context:
space:
mode:
Diffstat (limited to 'lld/MachO/MachOStructs.h')
-rw-r--r--lld/MachO/MachOStructs.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/lld/MachO/MachOStructs.h b/lld/MachO/MachOStructs.h
new file mode 100644
index 000000000000..69b50ec23173
--- /dev/null
+++ b/lld/MachO/MachOStructs.h
@@ -0,0 +1,36 @@
+//===- MachOStructs.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
+//
+//===----------------------------------------------------------------------===//
+//
+// This file defines structures used in the MachO object file format. Note that
+// unlike llvm/BinaryFormat/MachO.h, the structs here are defined in terms of
+// endian- and alignment-compatibility wrappers.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLD_MACHO_MACHO_STRUCTS_H
+#define LLD_MACHO_MACHO_STRUCTS_H
+
+#include "llvm/Support/Endian.h"
+
+namespace lld {
+
+namespace structs {
+
+struct nlist_64 {
+ llvm::support::ulittle32_t n_strx;
+ uint8_t n_type;
+ uint8_t n_sect;
+ llvm::support::ulittle16_t n_desc;
+ llvm::support::ulittle64_t n_value;
+};
+
+} // namespace structs
+
+} // namespace lld
+
+#endif