Fix some build errors on arm64.

Initialize the VDSO "os" and "arch" fields explicitly,
or the VDSO load process would failed on arm64 platform.

Signed-off-by: Haibo Xu <haibo.xu@arm.com>
Change-Id: Ic6768df88e43cd7c7956eb630511672ae11ac52f
This commit is contained in:
Haibo Xu 2019-11-11 09:42:04 +00:00
parent c5d9b5b881
commit 1d8b7292d7
2 changed files with 2 additions and 1 deletions

View File

@ -17,7 +17,6 @@
package kernel
import (
"gvisor.dev/gvisor/pkg/abi/linux"
"gvisor.dev/gvisor/pkg/sentry/usermem"
"gvisor.dev/gvisor/pkg/syserror"
)

View File

@ -268,6 +268,8 @@ func PrepareVDSO(ctx context.Context, mfp pgalloc.MemoryFileProvider) (*VDSO, er
// some applications may not be able to handle multiple [vdso]
// hints.
vdso: mm.NewSpecialMappable("", mfp, vdso),
os: info.os,
arch: info.arch,
phdrs: info.phdrs,
}, nil
}