mirror of
https://github.com/danog/gllvm.git
synced 2024-11-26 23:34:51 +01:00
one bug found. not fixed yet. gonna look at linux too first.
This commit is contained in:
parent
c900266e77
commit
50bfc93217
@ -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"
|
||||
|
@ -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
|
||||
|
||||
|
@ -14,7 +14,6 @@ const (
|
||||
debug_v
|
||||
)
|
||||
|
||||
//move these to constants.go
|
||||
const (
|
||||
loggingLevelEnvVar = "GLLVM_OUTPUT_LEVEL"
|
||||
loggingFileEnvVar = "GLLVM_OUTPUT_FILE"
|
||||
|
Loading…
Reference in New Issue
Block a user