mirror of
https://github.com/golang/go
synced 2024-11-25 07:17:56 -07:00
6l: correct offset for __nl_symbol_ptr in Mach-O.
Fixes malformed object message from nm etc. Fixes #1180. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/2390042
This commit is contained in:
parent
0f6926474f
commit
3d0726b04d
@ -497,7 +497,7 @@ asmbmacho(vlong symdatva, vlong symo)
|
|||||||
ms->vaddr = va+v;
|
ms->vaddr = va+v;
|
||||||
ms->vsize = w;
|
ms->vsize = w;
|
||||||
ms->fileoffset = v;
|
ms->fileoffset = v;
|
||||||
ms->filesize = datsize;
|
ms->filesize = datsize+dynptrsize;
|
||||||
ms->prot1 = 7;
|
ms->prot1 = 7;
|
||||||
ms->prot2 = 3;
|
ms->prot2 = 3;
|
||||||
|
|
||||||
@ -510,6 +510,7 @@ asmbmacho(vlong symdatva, vlong symo)
|
|||||||
msect = newMachoSect(ms, "__nl_symbol_ptr");
|
msect = newMachoSect(ms, "__nl_symbol_ptr");
|
||||||
msect->addr = va+v+datsize;
|
msect->addr = va+v+datsize;
|
||||||
msect->size = dynptrsize;
|
msect->size = dynptrsize;
|
||||||
|
msect->off = v+datsize;
|
||||||
msect->align = 2;
|
msect->align = 2;
|
||||||
msect->flag = 6; /* section with nonlazy symbol pointers */
|
msect->flag = 6; /* section with nonlazy symbol pointers */
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user