• 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
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...