• David Crawshaw's avatar
    cmd/compile, cmd/link: weak relocation for ptrTo · 6f31abd2
    David Crawshaw authored
    Introduce R_WEAKADDROFF, a "weak" variation of the R_ADDROFF relocation
    that will only reference the type described if it is in some other way
    reachable.
    
    Use this for the ptrToThis field in reflect type information where it
    is safe to do so (that is, types that don't need to be included for
    interface satisfaction, and types that won't cause the compiler to
    recursively generate an endless series of ptr-to-ptr-to-ptr-to...
    types).
    
    Also fix a small bug in reflect, where StructOf was not clearing the
    ptrToThis field of new types.
    
    Fixes #17931
    
    Change-Id: I4d3b53cb9c916c97b3b16e367794eee142247281
    Reviewed-on: https://go-review.googlesource.com/33427
    Run-TryBot: David Crawshaw <crawshaw@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    6f31abd2
Name
Last commit
Last update
..
amd64 Loading commit data...
arm Loading commit data...
arm64 Loading commit data...
gc Loading commit data...
mips Loading commit data...
mips64 Loading commit data...
ppc64 Loading commit data...
s390x Loading commit data...
ssa Loading commit data...
syntax Loading commit data...
test Loading commit data...
x86 Loading commit data...