aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/linux/thread.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-02-24 16:45:45 -0500
committerRuss Cox <rsc@golang.org>2011-02-24 16:45:45 -0500
commitd94bf76239441a5a819043db37bde28f22e20621 (patch)
treec3ac8b5c6332e97a9c6a457d669377aab8247881 /src/pkg/runtime/linux/thread.c
parent4185a9e2b28f7ae29743f702d3b35fbc7edaebc6 (diff)
downloadgo-d94bf76239441a5a819043db37bde28f22e20621.tar.xz
ld: weak symbols
A reference to the address of weak.foo resolves at link time to the address of the symbol foo if foo would end up in the binary anyway, or to zero if foo would not be in the binary. For example: int xxx = 1; int yyy = 2; int weak·xxx; int weak·yyy; void main·main(void) { runtime·printf("%p %p %p\n", &xxx, &weak·xxx, &weak·yyy); } prints the same non-nil address twice, then 0 (because yyy is not referenced so it was dropped from the binary). This will be used by the reflection tables. R=iant CC=golang-dev https://golang.org/cl/4223044
Diffstat (limited to 'src/pkg/runtime/linux/thread.c')
0 files changed, 0 insertions, 0 deletions