• Cherry Zhang's avatar
    [dev.link] cmd/link: add dupok symbols resolved to another package to textp · 5fec7882
    Cherry Zhang authored
    When a dupok symbol is resolved to another package, we still need
    to record its presence in the current package, as the trampoline
    pass expects packages are laid out in dependency order. At the
    point after deadcode where we populate symbol contents for
    reachable symbols (add relocations and read symbol data), make a
    note of the dupok text symbols for each package. Later in
    addToTextp we will visit packages in dependency order, process
    the dup text symbol list for each package and select a final lib
    for each dup text symbol.
    
    Change-Id: Ib885e0a7e2343229d853aa629e3e337111df6011
    Reviewed-on: https://go-review.googlesource.com/c/go/+/200797
    Run-TryBot: Cherry Zhang <cherryyz@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarThan McIntosh <thanm@google.com>
    5fec7882
objfile2.go 20.8 KB