return int(length)
}
+var encbuf [10]byte
+
func uleb128put(v int64) {
- var buf [10]byte
- n := uleb128enc(uint64(v), buf[:])
- Cwrite(buf[:n])
+ n := uleb128enc(uint64(v), encbuf[:])
+ Cwrite(encbuf[:n])
}
func sleb128put(v int64) {
- var buf [10]byte
- n := sleb128enc(v, buf[:])
- Cwrite(buf[:n])
+ n := sleb128enc(v, encbuf[:])
+ Cwrite(encbuf[:n])
}
/*
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// go-specific code shared across loaders (5l, 6l, 8l).
+
package ld
import (
return strings.Replace(t0, `"".`, pkg+".", -1)
}
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// go-specific code shared across loaders (5l, 6l, 8l).
-
// accumulate all type information from .6 files.
// check for inconsistencies.
}
size := int(rdint(f))
typ := rdsym(ctxt, f, pkg)
- var data []byte
- rddata(f, &data)
+ data := rddata(f)
nreloc := int(rdint(f))
if v != 0 {
s.Pcln = new(Pcln)
pc := s.Pcln
- rddata(f, &pc.Pcsp.P)
- rddata(f, &pc.Pcfile.P)
- rddata(f, &pc.Pcline.P)
+ pc.Pcsp.P = rddata(f)
+ pc.Pcfile.P = rddata(f)
+ pc.Pcline.P = rddata(f)
n = int(rdint(f))
pc.Pcdata = make([]Pcdata, n)
pc.Npcdata = n
for i := 0; i < n; i++ {
- rddata(f, &pc.Pcdata[i].P)
+ pc.Pcdata[i].P = rddata(f)
}
n = int(rdint(f))
pc.Funcdata = make([]*LSym, n)
return string(p)
}
-func rddata(f *Biobuf, pp *[]byte) {
+func rddata(f *Biobuf) []byte {
n := rdint(f)
- *pp = make([]byte, n)
- Bread(f, *pp)
+ p := make([]byte, n)
+ Bread(f, p)
+ return p
}
var symbuf []byte