diff options
| author | Ian Lance Taylor <iant@golang.org> | 2025-11-13 13:01:14 -0800 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2025-11-26 20:06:46 -0800 |
| commit | 43cfd785e72ccd04fe638395aa80029aae23fef6 (patch) | |
| tree | 967647d8ec8190d977368b8a80be1faf0d92bb0f /src/runtime | |
| parent | 312b2034a4e16583fac00070e698c3d464eca1c8 (diff) | |
| download | go-43cfd785e72ccd04fe638395aa80029aae23fef6.tar.xz | |
cmd/link, runtime, debug/gosym: move pclntab magic to internal/abi
Change-Id: I2d3c41b0e61b994d7b04bd16a791fd226dc45269
Reviewed-on: https://go-review.googlesource.com/c/go/+/720302
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime')
| -rw-r--r-- | src/runtime/symtab.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/runtime/symtab.go b/src/runtime/symtab.go index 3a814cd203..c1643c1b39 100644 --- a/src/runtime/symtab.go +++ b/src/runtime/symtab.go @@ -374,12 +374,12 @@ func (f *_func) funcInfo() funcInfo { // pcHeader holds data used by the pclntab lookups. type pcHeader struct { - magic uint32 // 0xFFFFFFF1 - pad1, pad2 uint8 // 0,0 - minLC uint8 // min instruction size - ptrSize uint8 // size of a ptr in bytes - nfunc int // number of functions in the module - nfiles uint // number of entries in the file tab + magic abi.PCLnTabMagic // abi.Go1NNPcLnTabMagic + pad1, pad2 uint8 // 0,0 + minLC uint8 // min instruction size + ptrSize uint8 // size of a ptr in bytes + nfunc int // number of functions in the module + nfiles uint // number of entries in the file tab // The next field used to be textStart. This is no longer stored // as it requires a relocation. Code should use the moduledata text @@ -623,7 +623,7 @@ const debugPcln = false func moduledataverify1(datap *moduledata) { // Check that the pclntab's format is valid. hdr := datap.pcHeader - if hdr.magic != 0xfffffff1 || hdr.pad1 != 0 || hdr.pad2 != 0 || + if hdr.magic != abi.CurrentPCLnTabMagic || hdr.pad1 != 0 || hdr.pad2 != 0 || hdr.minLC != sys.PCQuantum || hdr.ptrSize != goarch.PtrSize { println("runtime: pcHeader: magic=", hex(hdr.magic), "pad1=", hdr.pad1, "pad2=", hdr.pad2, "minLC=", hdr.minLC, "ptrSize=", hdr.ptrSize, "pluginpath=", datap.pluginpath) |
