1
0
mirror of https://github.com/golang/go synced 2024-11-25 08:07:57 -07:00

ld: Permit an ELF symbol to be exported in the dynamic symbol table.

This permits exporting crosscall2 from the runtime/cgo
package.

R=rsc
CC=golang-dev
https://golang.org/cl/3885041
This commit is contained in:
Ian Lance Taylor 2011-01-06 16:37:05 -08:00
parent 4cd31e8a28
commit 1b2d5b4c93

View File

@ -641,8 +641,10 @@ ldelf(Biobuf *f, char *pkg, int64 len, char *pn)
s->sub = sect->sym->sub; s->sub = sect->sym->sub;
sect->sym->sub = s; sect->sym->sub = s;
s->type = sect->sym->type | SSUB; s->type = sect->sym->type | SSUB;
if(!s->dynexport) {
s->dynimplib = nil; // satisfy dynimport s->dynimplib = nil; // satisfy dynimport
s->dynimpname = nil; // satisfy dynimport s->dynimpname = nil; // satisfy dynimport
}
s->value = sym.value; s->value = sym.value;
s->size = sym.size; s->size = sym.size;
s->outer = sect->sym; s->outer = sect->sym;