• Keith Randall's avatar
    cmd/link/internal/ld: exclude only real container symbols from symtab · 214c7a2c
    Keith Randall authored
    It looks like the test for whether symbols contain subsymbols is wrong.
    In particular, symbols in C libraries are mistakenly considered container
    symbols.
    
    Fix the test so only symbols which actually have a subsymbol
    are excluded from the symtab.  When linking cgo programs the list
    of containers is small, something like:
    
    container _/home/khr/sandbox/symtab/misc/cgo/test(.text)<74>
    container _/home/khr/sandbox/symtab/misc/cgo/test/issue8828(.text)<75>
    container _/home/khr/sandbox/symtab/misc/cgo/test/issue9026(.text)<76>
    container runtime/cgo(.text)<77>
    
    I'm not sure this is the right fix.  In particular I can't reproduce
    the original problem.  Anyone have a repro they can try and see if
    this fix works?
    
    Fixes #10747
    Fixes #11396
    
    Change-Id: Id8b016389d33348b4a791fdcba0f9db8ae71ebf3
    Reviewed-on: https://go-review.googlesource.com/11652Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    214c7a2c
Name
Last commit
Last update
..
arm Loading commit data...
arm64 Loading commit data...
ppc64 Loading commit data...
x86 Loading commit data...
ar.go Loading commit data...
data.go Loading commit data...
flag.go Loading commit data...
fmt.go Loading commit data...
funcdata.go Loading commit data...
go.go Loading commit data...
ld.go Loading commit data...
libc.go Loading commit data...
line_test.go Loading commit data...
link.go Loading commit data...
mgc0.go Loading commit data...
obj.go Loading commit data...
objfile.go Loading commit data...
pass.go Loading commit data...
pcln.go Loading commit data...
stack.go Loading commit data...
stringer.go Loading commit data...
sym.go Loading commit data...
textflag.go Loading commit data...
typekind.go Loading commit data...
util.go Loading commit data...