Skip to content

Commit

Permalink
Remove dealing with numbered addresses.
Browse files Browse the repository at this point in the history
  • Loading branch information
trhodeos committed Apr 1, 2018
1 parent 662183d commit 46c389c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ld.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ SECTIONS {
MAX(
ADDR(..{{index .Positioning.AfterMaxSegment 0}}.bss) + SIZEOF(..{{index .Positioning.AfterMaxSegment 0}}.bss),
ADDR(..{{index .Positioning.AfterMaxSegment 1}}.bss) + SIZEOF(..{{index .Positioning.AfterMaxSegment 1}}.bss))
{{else if not .Positioning.NoLoad}}
{{else if not (eq .Positioning.Address 0)}}
{{.Positioning.Address}}
{{end}}
:
Expand Down
5 changes: 2 additions & 3 deletions spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ type Positioning struct {
AfterMinSegment [2]string
AfterMaxSegment [2]string
Address uint64
NoLoad bool
}

type StackInfo struct {
Expand Down Expand Up @@ -169,8 +168,8 @@ func convertSegmentAst(s *SegmentAst) (*Segment, error) {
}
break
case "number":
seg.Positioning.Address = SignExtend(statement.Value.Int * 0x1000000)
seg.Positioning.NoLoad = true
// Don't do anything, as we don't really care here.
// All that matters for code is the rom address.
break
case "entry":
seg.Entry = &statement.Value.ConstantValue.Lhs.Symbol
Expand Down

0 comments on commit 46c389c

Please sign in to comment.