mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.link] cmd/link: remove ARM64 special handling of GC data in shared libraries
The special case is no longer needed, didn't actually work, and we no longer even save this map anywhere (see CL 240621 for more information). Change-Id: I19bcf32cace22decf50fd6414d4519cc51cbb0be Reviewed-on: https://go-review.googlesource.com/c/go/+/241982 Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
86f53c2a3c
commit
f3a29d3a34
1 changed files with 0 additions and 24 deletions
|
|
@ -2038,7 +2038,6 @@ func ldshlibsyms(ctxt *Link, shlib string) {
|
|||
Errorf(nil, "cannot read symbols from shared library: %s", libpath)
|
||||
return
|
||||
}
|
||||
gcdataLocations := make(map[uint64]loader.Sym)
|
||||
for _, elfsym := range syms {
|
||||
if elf.ST_TYPE(elfsym.Info) == elf.STT_NOTYPE || elf.ST_TYPE(elfsym.Info) == elf.STT_SECTION {
|
||||
continue
|
||||
|
|
@ -2085,7 +2084,6 @@ func ldshlibsyms(ctxt *Link, shlib string) {
|
|||
sname := l.SymName(s)
|
||||
if strings.HasPrefix(sname, "type.") && !strings.HasPrefix(sname, "type..") {
|
||||
su.SetData(readelfsymboldata(ctxt, f, &elfsym))
|
||||
gcdataLocations[elfsym.Value+2*uint64(ctxt.Arch.PtrSize)+8+1*uint64(ctxt.Arch.PtrSize)] = s
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2106,28 +2104,6 @@ func ldshlibsyms(ctxt *Link, shlib string) {
|
|||
su.AddReloc(loader.Reloc{Sym: s})
|
||||
}
|
||||
}
|
||||
if ctxt.Arch.Family == sys.ARM64 {
|
||||
for _, sect := range f.Sections {
|
||||
if sect.Type == elf.SHT_RELA {
|
||||
var rela elf.Rela64
|
||||
rdr := sect.Open()
|
||||
for {
|
||||
err := binary.Read(rdr, f.ByteOrder, &rela)
|
||||
if err == io.EOF {
|
||||
break
|
||||
} else if err != nil {
|
||||
Errorf(nil, "reading relocation failed %v", err)
|
||||
return
|
||||
}
|
||||
t := elf.R_AARCH64(rela.Info & 0xffff)
|
||||
if t != elf.R_AARCH64_RELATIVE {
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ctxt.Shlibs = append(ctxt.Shlibs, Shlib{Path: libpath, Hash: hash, Deps: deps, File: f})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue