Skip to content

Commit

Permalink
Merge pull request #7 from ChrisPVille/upstream
Browse files Browse the repository at this point in the history
Restore linker errors for incomplete binaries
  • Loading branch information
trhodeos authored Sep 5, 2020
2 parents b8ee273 + 618638d commit 47409fb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ld.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"text/template"
)

var ldArgs = []string{"-G 0", "-S", "-noinhibit-exec", "-nostartfiles", "-nodefaultlibs", "-nostdinc", "-M"}
var ldArgs = []string{"-G 0", "-S", "-nostartfiles", "-nodefaultlibs", "-nostdinc", "-M"}

func createLdScript(w *Wave) (io.Reader, error) {
t := `
Expand Down Expand Up @@ -70,7 +70,7 @@ SECTIONS {
{{end}}
. = ALIGN(0x10);
_{{.Name}}SegmentDataEnd = .;
} > ram
} {{if (gt .Positioning.Address 0x80000400)}} > ram {{end}}
_RomSize += (_{{.Name}}SegmentDataEnd - _{{.Name}}SegmentTextStart);
_{{.Name}}SegmentRomEnd = _RomSize;
Expand All @@ -93,7 +93,7 @@ SECTIONS {
. = ALIGN(0x10);
_{{.Name}}SegmentBssEnd = .;
_{{.Name}}SegmentEnd = .;
} > ram.bss
} {{if (gt .Positioning.Address 0x80000400)}} > ram.bss {{end}}
_{{.Name}}SegmentBssSize = _{{.Name}}SegmentBssEnd - _{{.Name}}SegmentBssStart;
{{ end }}
{{range .RawSegments -}}
Expand Down

0 comments on commit 47409fb

Please sign in to comment.