Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// Copyright 2025 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
The Unified IR (UIR) format is implicitly defined by the package noder.
At the highest level, a package encoded in UIR follows the grammar below.
File = Header Payload fingerprint .
Header = version [ flags ] sectionEnds elementEnds .
version = uint32 . // used for backward compatibility
flags = uint32 . // feature flags used across versions
sectionEnds = [10]uint32 . // defines section boundaries
elementEnds = []uint32 . // defines element boundaries
fingerprint = [8]byte . // sha256 fingerprint
The payload has a structure as well. It is a series of sections, which
contain elements of the same type. Go constructs are mapped onto
(potentially multiple) elements. It is represented as below.
TODO(markfreeman): Update when we rename RelocFoo to SectionFoo.
Payload = RelocString
RelocMeta
RelocPosBase
RelocPkg
RelocName
RelocType
RelocObj
RelocObjExt
RelocObjDict
RelocBody
.
*/
package noder