Skip to content

Commit

Permalink
Preserve debugging symbols in intermediate elf file
Browse files Browse the repository at this point in the history
  • Loading branch information
lambertjamesd committed Feb 11, 2021
1 parent 47409fb commit 465ae18
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ld.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ import (
"bytes"
"encoding/hex"
"fmt"
log "github.com/sirupsen/logrus"
"io"
"math/rand"
"os"
"path/filepath"
"text/template"

log "github.com/sirupsen/logrus"
)

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

func createLdScript(w *Wave) (io.Reader, error) {
t := `
Expand Down Expand Up @@ -114,7 +115,8 @@ SECTIONS {
/DISCARD/ :
{
/* Discard everything we haven't explicitly used. */
*(*)
*(.eh_frame)
*(.MIPS.abiflags)
}
_RomEnd = _RomSize;
}
Expand Down

0 comments on commit 465ae18

Please sign in to comment.