Commit 1b2d5b4c authored by Ian Lance Taylor's avatar Ian Lance Taylor

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
parent 4cd31e8a
......@@ -641,8 +641,10 @@ ldelf(Biobuf *f, char *pkg, int64 len, char *pn)
s->sub = sect->sym->sub;
sect->sym->sub = s;
s->type = sect->sym->type | SSUB;
s->dynimplib = nil; // satisfy dynimport
s->dynimpname = nil; // satisfy dynimport
if(!s->dynexport) {
s->dynimplib = nil; // satisfy dynimport
s->dynimpname = nil; // satisfy dynimport
}
s->value = sym.value;
s->size = sym.size;
s->outer = sect->sym;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment