mirror of
https://github.com/golang/go
synced 2024-11-20 06:04:52 -07:00
6l: work with OS X nm/otool
6l was skipping emitting the (2 byte) symbol table if there were no imported or exported symbols. You can't just drop the symbol table entirely - the linker dies if you have a linkedit section but no table. You can omit the linkedit section or both the linkedit and the dlyd parts in the right circumstances, but that seems much more risky to me. R=rsc CC=golang-dev https://golang.org/cl/2421042
This commit is contained in:
parent
12da5a90e0
commit
8a1b2e59ef
@ -410,7 +410,7 @@ domacholink(void)
|
|||||||
uint64 val;
|
uint64 val;
|
||||||
|
|
||||||
linkoff = 0;
|
linkoff = 0;
|
||||||
if(nlinkdata > 0) {
|
if(nlinkdata > 0 || nstrtab > 0) {
|
||||||
linkoff = rnd(HEADR+textsize, INITRND) + rnd(datsize, INITRND);
|
linkoff = rnd(HEADR+textsize, INITRND) + rnd(datsize, INITRND);
|
||||||
seek(cout, linkoff, 0);
|
seek(cout, linkoff, 0);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user