cmd := t.addCmd(dt, "misc/cgo/test", t.goTest())
setEnv(cmd, "GOFLAGS", "-ldflags=-linkmode=auto")
- // Skip internal linking cases on arm64 to support GCC-9.4 and above.
- // See issue #39466.
- skipInternalLink := goarch == "arm64" && goos != "darwin"
-
- if t.internalLink() && !skipInternalLink {
+ if t.internalLink() {
cmd := t.addCmd(dt, "misc/cgo/test", t.goTest(), "-tags=internal")
setEnv(cmd, "GOFLAGS", "-ldflags=-linkmode=internal")
}
if t.supportedBuildmode("pie") {
t.addCmd(dt, "misc/cgo/test", t.goTest(), "-buildmode=pie")
- if t.internalLink() && t.internalLinkPIE() && !skipInternalLink {
+ if t.internalLink() && t.internalLinkPIE() {
t.addCmd(dt, "misc/cgo/test", t.goTest(), "-buildmode=pie", "-ldflags=-linkmode=internal", "-tags=internal,internal_pie")
}
t.addCmd(dt, "misc/cgo/testtls", t.goTest(), "-buildmode=pie")
if targType == sym.SDYNIMPORT {
ldr.Errorf(s, "unexpected R_X86_64_PC32 relocation for dynamic symbol %s", ldr.SymName(targ))
}
- // TODO(mwhudson): the test of VisibilityHidden here probably doesn't make
- // sense and should be removed when someone has thought about it properly.
- if (targType == 0 || targType == sym.SXREF) && !ldr.AttrVisibilityHidden(targ) {
+ if targType == 0 || targType == sym.SXREF {
ldr.Errorf(s, "unknown symbol %s in pcrel", ldr.SymName(targ))
}
su := ldr.MakeSymbolUpdater(s)
if targType == sym.SDYNIMPORT {
ldr.Errorf(s, "unexpected R_AARCH64_PREL32 relocation for dynamic symbol %s", ldr.SymName(targ))
}
- // TODO(mwhudson): the test of VisibilityHidden here probably doesn't make
- // sense and should be removed when someone has thought about it properly.
- if (targType == 0 || targType == sym.SXREF) && !ldr.AttrVisibilityHidden(targ) {
+ if targType == 0 || targType == sym.SXREF {
ldr.Errorf(s, "unknown symbol %s in pcrel", ldr.SymName(targ))
}
su := ldr.MakeSymbolUpdater(s)
su.SetRelocSym(rIdx, syms.PLT)
su.SetRelocAdd(rIdx, r.Add()+int64(ldr.SymPlt(targ)))
}
- if (targType == 0 || targType == sym.SXREF) && !ldr.AttrVisibilityHidden(targ) {
+ if targType == 0 || targType == sym.SXREF {
ldr.Errorf(s, "unknown symbol %s in callarm64", ldr.SymName(targ))
}
su := ldr.MakeSymbolUpdater(s)
}
}
- // TODO(mwhudson): the test of VisibilityHidden here probably doesn't make
- // sense and should be removed when someone has thought about it properly.
- if s != 0 && l.SymType(s) == 0 && !l.AttrVisibilityHidden(s) && elfsym.type_ != elf.STT_SECTION {
+ if s != 0 && l.SymType(s) == 0 && elfsym.type_ != elf.STT_SECTION {
sb := l.MakeSymbolUpdater(s)
sb.SetType(sym.SXREF)
}