one bug found. not fixed yet. gonna look at linux too first.

This commit is contained in:
Ian A. Mason 2017-06-28 07:55:22 -07:00
parent c900266e77
commit 50bfc93217
3 changed files with 6 additions and 2 deletions

View File

@ -10,7 +10,7 @@ const(
AR_NAME = "GLLVM_AR_NAME"
BC_STORE_PATH = "GLLVM_BC_STORE"
// Gllvm functioning
// Gllvm functioning (once we have it working we can change the W to G; but for the time being leave it so that extract-bc works)
ELF_SECTION_NAME = ".llvm_bc"
DARWIN_SEGMENT_NAME = "__WLLVM"
DARWIN_SECTION_NAME = "__llvm_bc"

View File

@ -12,6 +12,7 @@ import (
"encoding/hex"
"io/ioutil"
"fmt"
"reflect"
)
type ExtractingArgs struct {
@ -253,7 +254,11 @@ func extractSectionDarwin(inputFile string) (contents string) {
if err != nil {
log.Fatal("There was an error extracting the gllvm section from ", inputFile, ". Make sure that the 'otool' command is installed.")
}
//FIXME: ok this looks all wrong. need to deal with out properly and the go way, whatever that may be.
logDebug("extractSectionDarwin: T(out) = %v \n", reflect.TypeOf(out))
logDebug("extractSectionDarwin: out = %v \n", out)
sectionLines := strings.Split(string(out), "\n")
logDebug("extractSectionDarwin: sectionLines = %v\n", out)
regExp := regexp.MustCompile(`^(?:[0-9a-f]{8,16}\t)?([0-9a-f\s]+)$`)
var octets []byte

View File

@ -14,7 +14,6 @@ const (
debug_v
)
//move these to constants.go
const (
loggingLevelEnvVar = "GLLVM_OUTPUT_LEVEL"
loggingFileEnvVar = "GLLVM_OUTPUT_FILE"