mirror of
https://github.com/golang/go
synced 2024-11-20 01:04:40 -07:00
cmd/ld: fix Linux/ARM build
CL 5823055 removed a line introduced in Linux/ARM cgo support. Because readsym() now returns nil for "$a", "$d" mapping symbols, no matter the settings of `needSym', we still have to guard against them in ldelf(). R=golang-dev, dave, rsc CC=golang-dev https://golang.org/cl/6220073
This commit is contained in:
parent
50e5951374
commit
e0b0f62d96
@ -575,6 +575,9 @@ ldelf(Biobuf *f, char *pkg, int64 len, char *pn)
|
||||
}
|
||||
if(sym.shndx >= obj->nsect || sym.shndx == 0)
|
||||
continue;
|
||||
// even when we pass needSym == 1 to readsym, it might still return nil to skip some unwanted symbols
|
||||
if(sym.sym == S)
|
||||
continue;
|
||||
sect = obj->sect+sym.shndx;
|
||||
if(sect->sym == nil) {
|
||||
diag("%s: sym#%d: ignoring %s in section %d (type %d)", pn, i, sym.name, sym.shndx, sym.type);
|
||||
|
Loading…
Reference in New Issue
Block a user