annotate lld/MachO/MachOStructs.h @ 207:2e18cbf3894f

LLVM12
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Tue, 08 Jun 2021 06:07:14 +0900
parents
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
207
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 //===- MachOStructs.h -------------------------------------------*- C++ -*-===//
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 //
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 // See https://llvm.org/LICENSE.txt for license information.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 //
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 //===----------------------------------------------------------------------===//
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 //
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 // This file defines structures used in the MachO object file format. Note that
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 // unlike llvm/BinaryFormat/MachO.h, the structs here are defined in terms of
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 // endian- and alignment-compatibility wrappers.
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 //
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 //===----------------------------------------------------------------------===//
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 #ifndef LLD_MACHO_MACHO_STRUCTS_H
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 #define LLD_MACHO_MACHO_STRUCTS_H
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 #include "llvm/Support/Endian.h"
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 namespace lld {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 namespace structs {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 struct nlist_64 {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 llvm::support::ulittle32_t n_strx;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 uint8_t n_type;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 uint8_t n_sect;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 llvm::support::ulittle16_t n_desc;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 llvm::support::ulittle64_t n_value;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 };
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 struct nlist {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 llvm::support::ulittle32_t n_strx;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 uint8_t n_type;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 uint8_t n_sect;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 llvm::support::ulittle16_t n_desc;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 llvm::support::ulittle32_t n_value;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 };
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 struct entry_point_command {
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 llvm::support::ulittle32_t cmd;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 llvm::support::ulittle32_t cmdsize;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 llvm::support::ulittle64_t entryoff;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 llvm::support::ulittle64_t stacksize;
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 };
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 } // namespace structs
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 } // namespace lld
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 #endif