mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.link] all: merge branch 'master' into dev.link
Clean merge. Change-Id: If78d97b9ac69511e4de7aa9532257d4fabebdcbc
This commit is contained in:
commit
c4ee16eda9
27 changed files with 661 additions and 324 deletions
|
|
@ -2070,17 +2070,6 @@ func ldshlibsyms(ctxt *Link, shlib string) {
|
|||
l.SetSymElfType(s, elf.ST_TYPE(elfsym.Info))
|
||||
su.SetSize(int64(elfsym.Size))
|
||||
if elfsym.Section != elf.SHN_UNDEF {
|
||||
// If it's not undefined, mark the symbol as reachable
|
||||
// so as to protect it from dead code elimination,
|
||||
// even if there aren't any explicit references to it.
|
||||
// Under the previous sym.Symbol based regime this
|
||||
// wasn't necessary, but for the loader-based deadcode
|
||||
// it is definitely needed.
|
||||
//
|
||||
// FIXME: have a more general/flexible mechanism for this?
|
||||
//
|
||||
l.SetAttrReachable(s, true)
|
||||
|
||||
// Set .File for the library that actually defines the symbol.
|
||||
l.SetSymPkg(s, libpath)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue