• 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
..
cmd Loading commit data...
lib9 Loading commit data...
libbio Loading commit data...
libmach Loading commit data...
pkg Loading commit data...
Make.ccmd Loading commit data...
Make.clib Loading commit data...
Make.cmd Loading commit data...
Make.common Loading commit data...
Make.inc Loading commit data...
Make.pkg Loading commit data...
all.bash Loading commit data...
clean.bash Loading commit data...
env.bash Loading commit data...
make.bash Loading commit data...
quietgcc.bash Loading commit data...
run.bash Loading commit data...
sudo.bash Loading commit data...
version.bash Loading commit data...