Documentation
¶
Index ¶
- func BinarizeObject(obj io.Reader, objcopy Runner) (io.Reader, error)
- func CreateEntryBinary(w *Wave, as Runner) (io.Reader, error)
- func CreateRawObjectWrapper(r io.Reader, outputName string, ld Runner) (io.Reader, error)
- func LinkSpec(w *Wave, ld Runner, entry io.Reader) (io.Reader, error)
- func PreprocessSpec(file io.Reader, gcc Runner, includeFlags []string, defineFlags []string, ...) (io.Reader, error)
- func SignExtend(in uint64) uint64
- func TempFileName(suffix string) string
- type Constant
- type ExecRunner
- type FlagAst
- type Flags
- type MappedFileRunner
- type MaxSegment
- type MinSegment
- type OutputFileRunner
- type Positioning
- type Runner
- type Segment
- type SegmentAst
- type Spec
- type SpecAst
- type StackInfo
- type StatementAst
- type Summand
- type Value
- type Wave
- type WaveAst
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRawObjectWrapper ¶ added in v0.5.0
func PreprocessSpec ¶ added in v0.2.0
func SignExtend ¶ added in v0.5.0
func TempFileName ¶ added in v0.4.0
Types ¶
type ExecRunner ¶ added in v0.4.0
type ExecRunner struct {
// contains filtered or unexported fields
}
func NewRunner ¶ added in v0.4.0
func NewRunner(cmd string) ExecRunner
type MappedFileRunner ¶ added in v0.4.0
type MappedFileRunner struct {
// contains filtered or unexported fields
}
func NewMappedFileRunner ¶ added in v0.4.0
type MaxSegment ¶
type MinSegment ¶
type OutputFileRunner ¶ added in v0.4.0
type OutputFileRunner struct {
// contains filtered or unexported fields
}
func NewOutputFileRunner ¶ added in v0.4.0
func NewOutputFileRunner(r Runner, outputFile string) OutputFileRunner
type Positioning ¶
type SegmentAst ¶
type SegmentAst struct {
Statements []*StatementAst `"beginseg" { @@ } "endseg"`
}
type SpecAst ¶
type SpecAst struct {
Segments []*SegmentAst `{ @@ }`
Waves []*WaveAst `{ @@ }`
}
type StatementAst ¶
type StatementAst struct {
/*
:name <segmentName>
|address <constant>
|after <segmentName>
|after max[<segmentName>,<segmentName>]
|after min[<segmentName>,<segmentName>]
|include <filename>
|maxsize <constant>
|align <constant>
|flags <flagList>
|number <constant>
|entry <symbol>
|stack <stackValue>
*/
// I tried using @Ident here, but the parser was greedily taking 'endseg' as name.
// By explicitly listing all known names here, we limit the search space.
Name string `@("name" | "address" | "after" | "include" | "maxsize" | "align" | "flags" | "number" | "entry" | "stack")`
Value Value `@@`
}
type Value ¶
type Value struct {
String string ` @String`
Int uint64 `| @Int`
Flags []*FlagAst `| @@ { @@ }`
ConstantValue *Summand `| @@`
MaxSegment *MaxSegment `| @@`
MinSegment *MinSegment `| @@`
}
Only one of these values will be set.
type Wave ¶
func (*Wave) GetBootSegment ¶
type WaveAst ¶
type WaveAst struct {
Statements []*StatementAst `"beginwave" { @@ } "endwave"`
}
Click to show internal directories.
Click to hide internal directories.