aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/symtab.go
diff options
context:
space:
mode:
authorHiroshi Ioka <hirochachacha@gmail.com>2017-09-04 21:23:29 +0900
committerDavid Crawshaw <crawshaw@golang.org>2017-09-10 12:54:13 +0000
commit1134411a833caa79017a1fffb9dd9afb102d5da9 (patch)
treeb831ac0e0fd9e7566c6a90b2c83c045510c44bed /src/runtime/symtab.go
parent1053ae5cf51bcc9d0b38c087880dda49b4825e0f (diff)
downloadgo-1134411a833caa79017a1fffb9dd9afb102d5da9.tar.gz
go-1134411a833caa79017a1fffb9dd9afb102d5da9.zip
cmd/go, cmd/link, cmd/dist: re-enable plugin mode on darwin/amd64
1. remove broken verification The runtime check assumes that no-pcln symbol entry have zero value, but the linker emit no entries if the symbol is no-pcln. As a result, if there are no-pcln symbols at the very end of pcln table, it will panic. 2. correct condition of export Handle special chracters in pluginpath correcty. Export "go.itab.*", so different plugins can share the same itab. Fixes #18190 Change-Id: Ia4f9c51d83ce8488a9470520f1ee9432802cfc1d Reviewed-on: https://go-review.googlesource.com/61091 Reviewed-by: David Crawshaw <crawshaw@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/symtab.go')
-rw-r--r--src/runtime/symtab.go25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/runtime/symtab.go b/src/runtime/symtab.go
index 4a68f4eaa0..7e001c96b1 100644
--- a/src/runtime/symtab.go
+++ b/src/runtime/symtab.go
@@ -526,7 +526,6 @@ func moduledataverify1(datap *moduledata) {
// ftab is lookup table for function by program counter.
nftab := len(datap.ftab) - 1
- var pcCache pcvalueCache
for i := 0; i < nftab; i++ {
// NOTE: ftab[nftab].entry is legal; it is the address beyond the final function.
if datap.ftab[i].entry > datap.ftab[i+1].entry {
@@ -542,30 +541,6 @@ func moduledataverify1(datap *moduledata) {
}
throw("invalid runtime symbol table")
}
-
- if debugPcln || nftab-i < 5 {
- // Check a PC near but not at the very end.
- // The very end might be just padding that is not covered by the tables.
- // No architecture rounds function entries to more than 16 bytes,
- // but if one came along we'd need to subtract more here.
- // But don't use the next PC if it corresponds to a foreign object chunk
- // (no pcln table, f2.pcln == 0). That chunk might have an alignment
- // more than 16 bytes.
- f := funcInfo{(*_func)(unsafe.Pointer(&datap.pclntable[datap.ftab[i].funcoff])), datap}
- end := f.entry
- if i+1 < nftab {
- f2 := funcInfo{(*_func)(unsafe.Pointer(&datap.pclntable[datap.ftab[i+1].funcoff])), datap}
- if f2.pcln != 0 {
- end = f2.entry - 16
- if end < f.entry {
- end = f.entry
- }
- }
- }
- pcvalue(f, f.pcfile, end, &pcCache, true)
- pcvalue(f, f.pcln, end, &pcCache, true)
- pcvalue(f, f.pcsp, end, &pcCache, true)
- }
}
if datap.minpc != datap.ftab[0].entry ||