• Russ Cox's avatar
    ld: weak symbols · d94bf762
    Russ Cox authored
    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
    d94bf762
Name
Last commit
Last update
..
6.out.h Loading commit data...
Makefile Loading commit data...
asm.c Loading commit data...
doc.go Loading commit data...
l.h Loading commit data...
list.c Loading commit data...
mkenam Loading commit data...
obj.c Loading commit data...
optab.c Loading commit data...
pass.c Loading commit data...
prof.c Loading commit data...
span.c Loading commit data...