Documentation
¶
Index ¶
- func BinarizeObject(obj_path string, objcopy_command string) (*os.File, error)
- func CreateEntryBinary(w *Wave, as_command string) (*os.File, error)
- func LinkSpec(w *Wave, ld_command string) (string, error)
- func PreprocessSpec(file io.Reader, gcc_command string, includeFlags []string, ...) (io.Reader, error)
- func RunCmd(command string, args ...string) error
- func RunCmdReturnStdout(command string, stdin io.Reader, args ...string) (io.Reader, error)
- type Constant
- type FlagAst
- type Flags
- type MaxSegment
- type MinSegment
- type Positioning
- 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 BinarizeObject ¶
func PreprocessSpec ¶ added in v0.2.0
Types ¶
type MaxSegment ¶
type MinSegment ¶
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 int `| @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.