diff --git a/src/cmd/6l/asm.go b/src/cmd/6l/asm.go index 4df8ac7196..a025ce6ea6 100644 --- a/src/cmd/6l/asm.go +++ b/src/cmd/6l/asm.go @@ -272,6 +272,12 @@ func adddynrel(s *ld.LSym, r *ld.Reloc) { case obj.R_ADDR: if s.Type == obj.STEXT && ld.Iself { + if ld.HEADTYPE == obj.Hsolaris { + addpltsym(targ) + r.Sym = ld.Linklookup(ld.Ctxt, ".plt", 0) + r.Add += int64(targ.Plt) + return + } // The code is asking for the address of an external // function. We provide it with the address of the // correspondent GOT symbol.