1 | // Copyright 2021 The Go Authors. All rights reserved. |
---|---|
2 | // Use of this source code is governed by a BSD-style |
3 | // license that can be found in the LICENSE file. |
4 | |
5 | package pkgbits |
6 | |
7 | // A RelocKind indicates a particular section within a unified IR export. |
8 | type RelocKind int32 |
9 | |
10 | // An Index represents a bitstream element index within a particular |
11 | // section. |
12 | type Index int32 |
13 | |
14 | // A relocEnt (relocation entry) is an entry in an element's local |
15 | // reference table. |
16 | // |
17 | // TODO(mdempsky): Rename this too. |
18 | type RelocEnt struct { |
19 | Kind RelocKind |
20 | Idx Index |
21 | } |
22 | |
23 | // Reserved indices within the meta relocation section. |
24 | const ( |
25 | PublicRootIdx Index = 0 |
26 | PrivateRootIdx Index = 1 |
27 | ) |
28 | |
29 | const ( |
30 | RelocString RelocKind = iota |
31 | RelocMeta |
32 | RelocPosBase |
33 | RelocPkg |
34 | RelocName |
35 | RelocType |
36 | RelocObj |
37 | RelocObjExt |
38 | RelocObjDict |
39 | RelocBody |
40 | |
41 | numRelocs = iota |
42 | ) |
43 |
Members