cmd/link: added support for mips64{,le}

Only internal linking without cgo is supported for now.

Change-Id: Ie6074a8ff3ec13605b72028f2d60758034f87185
Reviewed-on: https://go-review.googlesource.com/14444
Reviewed-by: Minux Ma <minux@golang.org>
This commit is contained in:
Yao Zhang 2015-09-10 11:32:49 -04:00 committed by Minux Ma
parent 43ea305435
commit 053c75411f
10 changed files with 529 additions and 16 deletions

View file

@ -1706,7 +1706,7 @@ func stkcheck(up *Chain, depth int) int {
r = &s.R[ri]
switch r.Type {
// Direct call.
case obj.R_CALL, obj.R_CALLARM, obj.R_CALLARM64, obj.R_CALLPOWER:
case obj.R_CALL, obj.R_CALLARM, obj.R_CALLARM64, obj.R_CALLPOWER, obj.R_CALLMIPS:
ch.limit = int(int32(limit) - pcsp.value - int32(callsize()))
ch.sym = r.Sym
if stkcheck(&ch, depth+1) < 0 {
@ -2028,7 +2028,7 @@ func callgraph() {
if r.Sym == nil {
continue
}
if (r.Type == obj.R_CALL || r.Type == obj.R_CALLARM || r.Type == obj.R_CALLPOWER) && r.Sym.Type == obj.STEXT {
if (r.Type == obj.R_CALL || r.Type == obj.R_CALLARM || r.Type == obj.R_CALLPOWER || r.Type == obj.R_CALLMIPS) && r.Sym.Type == obj.STEXT {
fmt.Fprintf(&Bso, "%s calls %s\n", s.Name, r.Sym.Name)
}
}