diff options
| author | Michael Hudson-Doyle <michael.hudson@canonical.com> | 2015-03-16 11:53:08 +1300 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2015-04-08 16:20:57 +0000 |
| commit | 3a84e3305b7edebf50f2cc3067aa009f9934488c (patch) | |
| tree | 9997743f8053b6f00277f9651f87b424b91f0b90 /src/runtime/runtime1.go | |
| parent | c468f94672af25bc34975ba96309e20e972fa340 (diff) | |
| download | go-3a84e3305b7edebf50f2cc3067aa009f9934488c.tar.xz | |
runtime, cmd/internal/ld: initialize themoduledata slices directly
This CL is quite conservative in some ways. It continues to define
symbols that have no real purpose (e.g. epclntab). These could be
deleted if there is no concern that external tools might look for them.
It would also now be possible to make some changes to the pcln data but
I get the impression that would definitely require some thought and
discussion.
Change-Id: Ib33cde07e4ec38ecc1d6c319a10138c9347933a3
Reviewed-on: https://go-review.googlesource.com/7616
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/runtime/runtime1.go')
| -rw-r--r-- | src/runtime/runtime1.go | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/runtime/runtime1.go b/src/runtime/runtime1.go index 072a58552e..5fddc582e9 100644 --- a/src/runtime/runtime1.go +++ b/src/runtime/runtime1.go @@ -427,12 +427,7 @@ func gomcache() *mcache { //go:linkname reflect_typelinks reflect.typelinks //go:nosplit func reflect_typelinks() []*_type { - var ret []*_type - sp := (*slice)(unsafe.Pointer(&ret)) - sp.array = (*byte)(unsafe.Pointer(themoduledata.typelink)) - sp.len = uint((themoduledata.etypelink - themoduledata.typelink) / unsafe.Sizeof(ret[0])) - sp.cap = sp.len - return ret + return themoduledata.typelinks } // TODO: move back into mgc.go |
