From 465ae18f5227e3631db7ceef928959d86df55156 Mon Sep 17 00:00:00 2001 From: James Lambert Date: Wed, 19 Aug 2020 18:47:02 -0600 Subject: [PATCH] Preserve debugging symbols in intermediate elf file --- ld.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ld.go b/ld.go index 1ddc3f2..2de7705 100644 --- a/ld.go +++ b/ld.go @@ -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 := ` @@ -114,7 +115,8 @@ SECTIONS { /DISCARD/ : { /* Discard everything we haven't explicitly used. */ - *(*) + *(.eh_frame) + *(.MIPS.abiflags) } _RomEnd = _RomSize; }