aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2014-08-27 20:15:05 -0400
committerRuss Cox <rsc@golang.org>2014-08-27 20:15:05 -0400
commit2c110a11e046920d98fb8b2cb41bfb99a524450b (patch)
treed6301647f0bada159de5fc95a234b7c2d4309a40 /src/pkg/runtime
parent9e360926972b35d2fd4c8f99f22669417876526b (diff)
downloadgo-2c110a11e046920d98fb8b2cb41bfb99a524450b.tar.xz
cmd/{ld,link,objdump}, runtime, debug/gosym: move linker-defined symbols into runtime package
Fixes #8092. LGTM=rsc R=iant, rsc CC=golang-codereviews https://golang.org/cl/126790043
Diffstat (limited to 'src/pkg/runtime')
-rw-r--r--src/pkg/runtime/heapdump.c16
-rw-r--r--src/pkg/runtime/malloc.c4
-rw-r--r--src/pkg/runtime/mem_plan9.c4
-rw-r--r--src/pkg/runtime/mgc0.c28
-rw-r--r--src/pkg/runtime/os_dragonfly.c4
-rw-r--r--src/pkg/runtime/os_freebsd.c4
-rw-r--r--src/pkg/runtime/os_linux.c4
-rw-r--r--src/pkg/runtime/os_solaris.c10
-rw-r--r--src/pkg/runtime/os_windows_386.c4
-rw-r--r--src/pkg/runtime/os_windows_amd64.c4
-rw-r--r--src/pkg/runtime/proc.c4
-rw-r--r--src/pkg/runtime/race.c10
-rw-r--r--src/pkg/runtime/race_amd64.s4
-rw-r--r--src/pkg/runtime/stubs.goc6
-rw-r--r--src/pkg/runtime/symtab.c36
-rw-r--r--src/pkg/runtime/symtab.go10
16 files changed, 76 insertions, 76 deletions
diff --git a/src/pkg/runtime/heapdump.c b/src/pkg/runtime/heapdump.c
index ea299d0a2e..09d109199b 100644
--- a/src/pkg/runtime/heapdump.c
+++ b/src/pkg/runtime/heapdump.c
@@ -19,10 +19,10 @@
#include "zaexperiment.h"
#include "../../cmd/ld/textflag.h"
-extern byte data[];
-extern byte edata[];
-extern byte bss[];
-extern byte ebss[];
+extern byte runtime·data[];
+extern byte runtime·edata[];
+extern byte runtime·bss[];
+extern byte runtime·ebss[];
enum {
FieldKindEol = 0,
@@ -487,14 +487,14 @@ dumproots(void)
// data segment
dumpint(TagData);
- dumpint((uintptr)data);
- dumpmemrange(data, edata - data);
+ dumpint((uintptr)runtime·data);
+ dumpmemrange(runtime·data, runtime·edata - runtime·data);
dumpfields(runtime·gcdatamask);
// bss segment
dumpint(TagBss);
- dumpint((uintptr)bss);
- dumpmemrange(bss, ebss - bss);
+ dumpint((uintptr)runtime·bss);
+ dumpmemrange(runtime·bss, runtime·ebss - runtime·bss);
dumpfields(runtime·gcdatamask);
// MSpan.types
diff --git a/src/pkg/runtime/malloc.c b/src/pkg/runtime/malloc.c
index ca8ebf5dd6..913d8ac26b 100644
--- a/src/pkg/runtime/malloc.c
+++ b/src/pkg/runtime/malloc.c
@@ -125,7 +125,7 @@ runtime·mallocinit(void)
{
byte *p, *p1;
uintptr arena_size, bitmap_size, spans_size, p_size;
- extern byte end[];
+ extern byte runtime·end[];
uintptr limit;
uint64 i;
bool reserved;
@@ -232,7 +232,7 @@ runtime·mallocinit(void)
// So adjust it upward a little bit ourselves: 1/4 MB to get
// away from the running binary image and then round up
// to a MB boundary.
- p = (byte*)ROUND((uintptr)end + (1<<18), 1<<20);
+ p = (byte*)ROUND((uintptr)runtime·end + (1<<18), 1<<20);
p_size = bitmap_size + spans_size + arena_size + PageSize;
p = runtime·SysReserve(p, p_size, &reserved);
if(p == nil)
diff --git a/src/pkg/runtime/mem_plan9.c b/src/pkg/runtime/mem_plan9.c
index ea35a1709c..249c6f2255 100644
--- a/src/pkg/runtime/mem_plan9.c
+++ b/src/pkg/runtime/mem_plan9.c
@@ -8,8 +8,8 @@
#include "malloc.h"
#include "os_GOOS.h"
-extern byte end[];
-static byte *bloc = { end };
+extern byte runtime·end[];
+static byte *bloc = { runtime·end };
static Lock memlock;
enum
diff --git a/src/pkg/runtime/mgc0.c b/src/pkg/runtime/mgc0.c
index 61961f6471..68e45a316e 100644
--- a/src/pkg/runtime/mgc0.c
+++ b/src/pkg/runtime/mgc0.c
@@ -158,13 +158,13 @@ struct FinBlock
Finalizer fin[1];
};
-extern byte data[];
-extern byte edata[];
-extern byte bss[];
-extern byte ebss[];
+extern byte runtime·data[];
+extern byte runtime·edata[];
+extern byte runtime·bss[];
+extern byte runtime·ebss[];
-extern byte gcdata[];
-extern byte gcbss[];
+extern byte runtime·gcdata[];
+extern byte runtime·gcbss[];
static Lock finlock; // protects the following variables
static FinBlock *finq; // list of finalizers that are to be executed
@@ -490,11 +490,11 @@ markroot(ParFor *desc, uint32 i)
// Note: if you add a case here, please also update heapdump.c:dumproots.
switch(i) {
case RootData:
- scanblock(data, edata - data, (byte*)runtime·gcdatamask.data);
+ scanblock(runtime·data, runtime·edata - runtime·data, (byte*)runtime·gcdatamask.data);
break;
case RootBss:
- scanblock(bss, ebss - bss, (byte*)runtime·gcbssmask.data);
+ scanblock(runtime·bss, runtime·ebss - runtime·bss, (byte*)runtime·gcbssmask.data);
break;
case RootFinalizers:
@@ -1300,8 +1300,8 @@ runtime·gcinit(void)
work.markfor = runtime·parforalloc(MaxGcproc);
runtime·gcpercent = runtime·readgogc();
- runtime·gcdatamask = unrollglobgcprog(gcdata, edata - data);
- runtime·gcbssmask = unrollglobgcprog(gcbss, ebss - bss);
+ runtime·gcdatamask = unrollglobgcprog(runtime·gcdata, runtime·edata - runtime·data);
+ runtime·gcbssmask = unrollglobgcprog(runtime·gcbss, runtime·ebss - runtime·bss);
}
// force = 1 - do GC regardless of current heap usage
@@ -2035,24 +2035,24 @@ runtime·getgcmask(byte *p, Type *t, byte **mask, uintptr *len)
*len = 0;
// data
- if(p >= data && p < edata) {
+ if(p >= runtime·data && p < runtime·edata) {
n = ((PtrType*)t)->elem->size;
*len = n/PtrSize;
*mask = runtime·mallocgc(*len, nil, 0);
for(i = 0; i < n; i += PtrSize) {
- off = (p+i-data)/PtrSize;
+ off = (p+i-runtime·data)/PtrSize;
bits = (((byte*)runtime·gcdatamask.data)[off/PointersPerByte] >> ((off%PointersPerByte)*BitsPerPointer))&BitsMask;
(*mask)[i/PtrSize] = bits;
}
return;
}
// bss
- if(p >= bss && p < ebss) {
+ if(p >= runtime·bss && p < runtime·ebss) {
n = ((PtrType*)t)->elem->size;
*len = n/PtrSize;
*mask = runtime·mallocgc(*len, nil, 0);
for(i = 0; i < n; i += PtrSize) {
- off = (p+i-bss)/PtrSize;
+ off = (p+i-runtime·bss)/PtrSize;
bits = (((byte*)runtime·gcbssmask.data)[off/PointersPerByte] >> ((off%PointersPerByte)*BitsPerPointer))&BitsMask;
(*mask)[i/PtrSize] = bits;
}
diff --git a/src/pkg/runtime/os_dragonfly.c b/src/pkg/runtime/os_dragonfly.c
index ce5307af07..1132f5741d 100644
--- a/src/pkg/runtime/os_dragonfly.c
+++ b/src/pkg/runtime/os_dragonfly.c
@@ -207,7 +207,7 @@ uintptr
runtime·memlimit(void)
{
Rlimit rl;
- extern byte text[], end[];
+ extern byte runtime·text[], runtime·end[];
uintptr used;
if(runtime·getrlimit(RLIMIT_AS, &rl) != 0)
@@ -218,7 +218,7 @@ runtime·memlimit(void)
// Estimate our VM footprint excluding the heap.
// Not an exact science: use size of binary plus
// some room for thread stacks.
- used = end - text + (64<<20);
+ used = runtime·end - runtime·text + (64<<20);
if(used >= rl.rlim_cur)
return 0;
diff --git a/src/pkg/runtime/os_freebsd.c b/src/pkg/runtime/os_freebsd.c
index 794578c208..20f71c41e8 100644
--- a/src/pkg/runtime/os_freebsd.c
+++ b/src/pkg/runtime/os_freebsd.c
@@ -215,7 +215,7 @@ uintptr
runtime·memlimit(void)
{
Rlimit rl;
- extern byte text[], end[];
+ extern byte runtime·text[], runtime·end[];
uintptr used;
if(runtime·getrlimit(RLIMIT_AS, &rl) != 0)
@@ -226,7 +226,7 @@ runtime·memlimit(void)
// Estimate our VM footprint excluding the heap.
// Not an exact science: use size of binary plus
// some room for thread stacks.
- used = end - text + (64<<20);
+ used = runtime·end - runtime·text + (64<<20);
if(used >= rl.rlim_cur)
return 0;
diff --git a/src/pkg/runtime/os_linux.c b/src/pkg/runtime/os_linux.c
index 77754f481c..33c7563743 100644
--- a/src/pkg/runtime/os_linux.c
+++ b/src/pkg/runtime/os_linux.c
@@ -255,7 +255,7 @@ uintptr
runtime·memlimit(void)
{
Rlimit rl;
- extern byte text[], end[];
+ extern byte runtime·text[], runtime·end[];
uintptr used;
if(runtime·getrlimit(RLIMIT_AS, &rl) != 0)
@@ -266,7 +266,7 @@ runtime·memlimit(void)
// Estimate our VM footprint excluding the heap.
// Not an exact science: use size of binary plus
// some room for thread stacks.
- used = end - text + (64<<20);
+ used = runtime·end - runtime·text + (64<<20);
if(used >= rl.rlim_cur)
return 0;
diff --git a/src/pkg/runtime/os_solaris.c b/src/pkg/runtime/os_solaris.c
index fe218cdb81..272e07cdb5 100644
--- a/src/pkg/runtime/os_solaris.c
+++ b/src/pkg/runtime/os_solaris.c
@@ -9,9 +9,9 @@
#include "stack.h"
#include "../../cmd/ld/textflag.h"
-#pragma dynexport end _end
-#pragma dynexport etext _etext
-#pragma dynexport edata _edata
+#pragma dynexport runtime·end _end
+#pragma dynexport runtime·etext _etext
+#pragma dynexport runtime·edata _edata
#pragma dynimport libc·___errno ___errno "libc.so"
#pragma dynimport libc·clock_gettime clock_gettime "libc.so"
@@ -247,7 +247,7 @@ uintptr
runtime·memlimit(void)
{
Rlimit rl;
- extern byte text[], end[];
+ extern byte runtime·text[], runtime·end[];
uintptr used;
if(runtime·getrlimit(RLIMIT_AS, &rl) != 0)
@@ -258,7 +258,7 @@ runtime·memlimit(void)
// Estimate our VM footprint excluding the heap.
// Not an exact science: use size of binary plus
// some room for thread stacks.
- used = end - text + (64<<20);
+ used = runtime·end - runtime·text + (64<<20);
if(used >= rl.rlim_cur)
return 0;
diff --git a/src/pkg/runtime/os_windows_386.c b/src/pkg/runtime/os_windows_386.c
index 02bc81adbf..15a5ea5d1f 100644
--- a/src/pkg/runtime/os_windows_386.c
+++ b/src/pkg/runtime/os_windows_386.c
@@ -34,7 +34,7 @@ runtime·sighandler(ExceptionRecord *info, Context *r, G *gp)
{
bool crash;
uintptr *sp;
- extern byte text[], etext[];
+ extern byte runtime·text[], runtime·etext[];
if(info->ExceptionCode == DBG_PRINTEXCEPTION_C) {
// This exception is intended to be caught by debuggers.
@@ -51,7 +51,7 @@ runtime·sighandler(ExceptionRecord *info, Context *r, G *gp)
// Only handle exception if executing instructions in Go binary
// (not Windows library code).
- if(r->Eip < (uint32)text || (uint32)etext < r->Eip)
+ if(r->Eip < (uint32)runtime·text || (uint32)runtime·etext < r->Eip)
return 0;
switch(info->ExceptionCode) {
diff --git a/src/pkg/runtime/os_windows_amd64.c b/src/pkg/runtime/os_windows_amd64.c
index a7acf1d786..9a69d73c07 100644
--- a/src/pkg/runtime/os_windows_amd64.c
+++ b/src/pkg/runtime/os_windows_amd64.c
@@ -42,7 +42,7 @@ runtime·sighandler(ExceptionRecord *info, Context *r, G *gp)
{
bool crash;
uintptr *sp;
- extern byte text[], etext[];
+ extern byte runtime·text[], runtime·etext[];
if(info->ExceptionCode == DBG_PRINTEXCEPTION_C) {
// This exception is intended to be caught by debuggers.
@@ -59,7 +59,7 @@ runtime·sighandler(ExceptionRecord *info, Context *r, G *gp)
// Only handle exception if executing instructions in Go binary
// (not Windows library code).
- if(r->Rip < (uint64)text || (uint64)etext < r->Rip)
+ if(r->Rip < (uint64)runtime·text || (uint64)runtime·etext < r->Rip)
return 0;
switch(info->ExceptionCode) {
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c
index 756f86bd99..a692dfd2cf 100644
--- a/src/pkg/runtime/proc.c
+++ b/src/pkg/runtime/proc.c
@@ -2407,7 +2407,7 @@ static struct {
static void System(void) {}
static void ExternalCode(void) {}
static void GC(void) {}
-extern byte etext[];
+extern byte runtime·etext[];
// Called if we receive a SIGPROF signal.
void
@@ -2532,7 +2532,7 @@ runtime·sigprof(uint8 *pc, uint8 *sp, uint8 *lr, G *gp, M *mp)
// If all of the above has failed, account it against abstract "System" or "GC".
n = 2;
// "ExternalCode" is better than "etext".
- if((uintptr)pc > (uintptr)etext)
+ if((uintptr)pc > (uintptr)runtime·etext)
pc = (byte*)ExternalCode + PCQuantum;
stk[0] = (uintptr)pc;
if(mp->gcing || mp->helpgc)
diff --git a/src/pkg/runtime/race.c b/src/pkg/runtime/race.c
index 6a4d2803c1..07623be1aa 100644
--- a/src/pkg/runtime/race.c
+++ b/src/pkg/runtime/race.c
@@ -47,8 +47,8 @@ void __tsan_release_merge(void);
#pragma cgo_import_static __tsan_func_enter
#pragma cgo_import_static __tsan_func_exit
-extern byte noptrdata[];
-extern byte enoptrbss[];
+extern byte runtime·noptrdata[];
+extern byte runtime·enoptrbss[];
// start/end of heap for race_amd64.s
uintptr runtime·racearenastart;
@@ -70,7 +70,7 @@ isvalidaddr(uintptr addr)
{
if(addr >= runtime·racearenastart && addr < runtime·racearenaend)
return true;
- if(addr >= (uintptr)noptrdata && addr < (uintptr)enoptrbss)
+ if(addr >= (uintptr)runtime·noptrdata && addr < (uintptr)runtime·enoptrbss)
return true;
return false;
}
@@ -85,8 +85,8 @@ runtime·raceinit(void)
runtime·throw("raceinit: race build must use cgo");
runtime·racecall(__tsan_init, &racectx, runtime·racesymbolizethunk);
// Round data segment to page boundaries, because it's used in mmap().
- start = (uintptr)noptrdata & ~(PageSize-1);
- size = ROUND((uintptr)enoptrbss - start, PageSize);
+ start = (uintptr)runtime·noptrdata & ~(PageSize-1);
+ size = ROUND((uintptr)runtime·enoptrbss - start, PageSize);
runtime·racecall(__tsan_map_shadow, start, size);
return racectx;
}
diff --git a/src/pkg/runtime/race_amd64.s b/src/pkg/runtime/race_amd64.s
index 30281d224b..f4e72386d8 100644
--- a/src/pkg/runtime/race_amd64.s
+++ b/src/pkg/runtime/race_amd64.s
@@ -144,10 +144,10 @@ TEXT racecalladdr<>(SB), NOSPLIT, $0-0
CMPQ RARG1, runtime·racearenaend(SB)
JB racecalladdr_call
racecalladdr_data:
- MOVQ $noptrdata(SB), R13
+ MOVQ $runtime·noptrdata(SB), R13
CMPQ RARG1, R13
JB racecalladdr_ret
- MOVQ $enoptrbss(SB), R13
+ MOVQ $runtime·enoptrbss(SB), R13
CMPQ RARG1, R13
JAE racecalladdr_ret
racecalladdr_call:
diff --git a/src/pkg/runtime/stubs.goc b/src/pkg/runtime/stubs.goc
index b30c40286c..1cda75e395 100644
--- a/src/pkg/runtime/stubs.goc
+++ b/src/pkg/runtime/stubs.goc
@@ -123,8 +123,8 @@ func gopersistentalloc(size uintptr) (x *void) {
#pragma textflag NOSPLIT
func reflect·typelinks() (ret Slice) {
- extern Type *typelink[], *etypelink[];
- ret.array = (byte*)typelink;
- ret.len = etypelink - typelink;
+ extern Type *runtime·typelink[], *runtime·etypelink[];
+ ret.array = (byte*)runtime·typelink;
+ ret.len = runtime·etypelink - runtime·typelink;
ret.cap = ret.len;
}
diff --git a/src/pkg/runtime/symtab.c b/src/pkg/runtime/symtab.c
index 613aa942ed..802ad5da38 100644
--- a/src/pkg/runtime/symtab.c
+++ b/src/pkg/runtime/symtab.c
@@ -19,15 +19,15 @@ struct Ftab
uintptr funcoff;
};
-extern byte pclntab[];
-extern byte epclntab[];
+extern byte runtime·pclntab[];
+extern byte runtime·epclntab[];
static Ftab *ftab;
static uintptr runtime·nftab;
static uint32 *filetab;
static uint32 runtime·nfiletab;
-extern Slice runtime·pclntab;
+extern Slice runtime·pclntable;
extern Slice runtime·ftabs;
extern Slice runtime·filetab;
extern uint32 runtime·pcquantum;
@@ -43,33 +43,33 @@ runtime·symtabinit(void)
// See golang.org/s/go12symtab for header: 0xfffffffb,
// two zero bytes, a byte giving the PC quantum,
// and a byte giving the pointer width in bytes.
- if(*(uint32*)pclntab != 0xfffffffb || pclntab[4] != 0 || pclntab[5] != 0 || pclntab[6] != PCQuantum || pclntab[7] != sizeof(void*)) {
- runtime·printf("runtime: function symbol table header: %x %x\n", *(uint32*)pclntab, *(uint32*)(pclntab+4));
+ if(*(uint32*)runtime·pclntab != 0xfffffffb || runtime·pclntab[4] != 0 || runtime·pclntab[5] != 0 || runtime·pclntab[6] != PCQuantum || runtime·pclntab[7] != sizeof(void*)) {
+ runtime·printf("runtime: function symbol table header: %x %x\n", *(uint32*)runtime·pclntab, *(uint32*)(runtime·pclntab+4));
runtime·throw("invalid function symbol table\n");
}
- runtime·nftab = *(uintptr*)(pclntab+8);
- ftab = (Ftab*)(pclntab+8+sizeof(void*));
+ runtime·nftab = *(uintptr*)(runtime·pclntab+8);
+ ftab = (Ftab*)(runtime·pclntab+8+sizeof(void*));
for(i=0; i<runtime·nftab; i++) {
// NOTE: ftab[runtime·nftab].entry is legal; it is the address beyond the final function.
if(ftab[i].entry > ftab[i+1].entry) {
- f1 = (Func*)(pclntab + ftab[i].funcoff);
- f2 = (Func*)(pclntab + ftab[i+1].funcoff);
+ f1 = (Func*)(runtime·pclntab + ftab[i].funcoff);
+ f2 = (Func*)(runtime·pclntab + ftab[i+1].funcoff);
runtime·printf("function symbol table not sorted by program counter: %p %s > %p %s", ftab[i].entry, runtime·funcname(f1), ftab[i+1].entry, i+1 == runtime·nftab ? "end" : runtime·funcname(f2));
for(j=0; j<=i; j++)
- runtime·printf("\t%p %s\n", ftab[j].entry, runtime·funcname((Func*)(pclntab + ftab[j].funcoff)));
+ runtime·printf("\t%p %s\n", ftab[j].entry, runtime·funcname((Func*)(runtime·pclntab + ftab[j].funcoff)));
runtime·throw("invalid runtime symbol table");
}
}
- filetab = (uint32*)(pclntab + *(uint32*)&ftab[runtime·nftab].funcoff);
+ filetab = (uint32*)(runtime·pclntab + *(uint32*)&ftab[runtime·nftab].funcoff);
runtime·nfiletab = filetab[0];
runtime·pcquantum = PCQuantum;
- runtime·pclntab.array = (byte*)pclntab;
- runtime·pclntab.len = (byte*)epclntab - (byte*)pclntab;
- runtime·pclntab.cap = runtime·pclntab.len;
+ runtime·pclntable.array = (byte*)runtime·pclntab;
+ runtime·pclntable.len = (byte*)runtime·epclntab - (byte*)runtime·pclntab;
+ runtime·pclntable.cap = runtime·pclntable.len;
runtime·ftabs.array = (byte*)ftab;
runtime·ftabs.len = runtime·nftab+1;
@@ -155,7 +155,7 @@ pcvalue(Func *f, int32 off, uintptr targetpc, bool strict)
// The table ends at a value delta of 0 except in the first pair.
if(off == 0)
return -1;
- p = pclntab + off;
+ p = runtime·pclntab + off;
pc = f->entry;
value = -1;
@@ -194,7 +194,7 @@ runtime·funcname(Func *f)
{
if(f == nil || f->nameoff == 0)
return nil;
- return (int8*)(pclntab + f->nameoff);
+ return (int8*)(runtime·pclntab + f->nameoff);
}
static int32
@@ -210,7 +210,7 @@ funcline(Func *f, uintptr targetpc, String *file, bool strict)
// runtime·printf("looking for %p in %S got file=%d line=%d\n", targetpc, *f->name, fileno, line);
return 0;
}
- *file = runtime·gostringnocopy(pclntab + filetab[fileno]);
+ *file = runtime·gostringnocopy(runtime·pclntab + filetab[fileno]);
return line;
}
@@ -264,7 +264,7 @@ runtime·findfunc(uintptr addr)
while(nf > 0) {
n = nf/2;
if(f[n].entry <= addr && addr < f[n+1].entry)
- return (Func*)(pclntab + f[n].funcoff);
+ return (Func*)(runtime·pclntab + f[n].funcoff);
else if(addr < f[n].entry)
nf = n;
else {
diff --git a/src/pkg/runtime/symtab.go b/src/pkg/runtime/symtab.go
index e8f45cfc01..880a78d481 100644
--- a/src/pkg/runtime/symtab.go
+++ b/src/pkg/runtime/symtab.go
@@ -24,7 +24,7 @@ func FuncForPC(pc uintptr) *Func {
n := nf / 2
f := &ftabs[lo+n]
if f.entry <= pc && pc < ftabs[lo+n+1].entry {
- return (*Func)(unsafe.Pointer(&pclntab[f.funcoff]))
+ return (*Func)(unsafe.Pointer(&pclntable[f.funcoff]))
} else if pc < f.entry {
nf = n
} else {
@@ -39,7 +39,7 @@ func FuncForPC(pc uintptr) *Func {
// Name returns the name of the function.
func (f *Func) Name() string {
- return cstringToGo(unsafe.Pointer(&pclntab[f.nameoff]))
+ return cstringToGo(unsafe.Pointer(&pclntable[f.nameoff]))
}
// Entry returns the entry address of the function.
@@ -60,7 +60,7 @@ func (f *Func) FileLine(pc uintptr) (file string, line int) {
if line == -1 {
return "?", 0
}
- file = cstringToGo(unsafe.Pointer(&pclntab[filetab[fileno]]))
+ file = cstringToGo(unsafe.Pointer(&pclntable[filetab[fileno]]))
return file, line
}
@@ -69,7 +69,7 @@ func (f *Func) pcvalue(off int32, targetpc uintptr) int32 {
if off == 0 {
return -1
}
- p := pclntab[off:]
+ p := pclntable[off:]
pc := f.entry
val := int32(-1)
for {
@@ -120,7 +120,7 @@ func readvarint(p []byte) (newp []byte, val uint32) {
// Populated by runtime·symtabinit during bootstrapping. Treat as immutable.
var (
- pclntab []byte
+ pclntable []byte
ftabs []ftab
filetab []uint32
pcquantum uint32