Skip to content

cmd/link: clear up the Shlib record when building a pkg #26540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/cmd/go/internal/work/buildid.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,7 @@ func (b *Builder) useCache(a *Action, p *load.Package, actionHash cache.ActionID
}
}
a.built = file
a.Package.Shlib = ""
a.Target = "DO NOT USE - using cache"
a.buildID = buildID
if p := a.Package; p != nil {
Expand Down
1 change: 1 addition & 0 deletions src/cmd/go/internal/work/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@ func (b *Builder) build(a *Action) (err error) {
}

a.built = objpkg
a.Package.Shlib = ""
return nil
}

Expand Down
8 changes: 5 additions & 3 deletions src/cmd/internal/obj/mips/asm0.go
Original file line number Diff line number Diff line change
Expand Up @@ -1120,9 +1120,11 @@ func (c *ctxt0) asmout(p *obj.Prog, o *Optab, out []uint32) {
case 1: /* mov r1,r2 ==> OR r1,r0,r2 */
a := AOR
if p.As == AMOVW && c.ctxt.Arch.Family == sys.MIPS64 {
a = AADDU // sign-extended to high 32 bits
}
o1 = OP_RRR(c.oprrr(a), uint32(REGZERO), uint32(p.From.Reg), uint32(p.To.Reg))
a = ASLL // sign-extended to high 32 bits
o1 = OP_RRR(c.oprrr(a), uint32(p.From.Reg), uint32(REGZERO), uint32(p.To.Reg))
} else {
o1 = OP_RRR(c.oprrr(a), uint32(REGZERO), uint32(p.From.Reg), uint32(p.To.Reg))
}

case 2: /* add/sub r1,[r2],r3 */
r := int(p.Reg)
Expand Down