]> Cypherpunks repositories - gostls13.git/commit
runtime: factor amd64 specifics from vdso_linux.go
authorFrank Somers <fsomers@arista.com>
Tue, 10 Oct 2017 21:27:01 +0000 (22:27 +0100)
committerIan Lance Taylor <iant@golang.org>
Fri, 13 Oct 2017 02:04:20 +0000 (02:04 +0000)
commitc14dcfda6b5dbe8f4dfa21ccc02c569567e9da54
tree09edcee48de1bfa407177bbbd957194134291922
parentc58b98b2d617ab2dfe839c4e5ef1e2008c9b60cf
runtime: factor amd64 specifics from vdso_linux.go

This is a preparation step for adding vDSO support on linux/386.

This change relocates the elf64 and amd64 specifics from
vdso_linux.go to a new vdso_linux_amd64.go.

This should enable vdso_linux.go to be used for vDSO
support on linux architectures other than amd64.

- Relocate the elf64X structure definitions appropriate to amd64,
  and change their names to elfX so that the code in vdso_linux.go
  is ELFnn-agnostic.

- Relocate the sym_keys and corresponding __vdso_* variables
  appropriate to amd64.

- Provide an amd64-specific constant for the maximum byte size of
  an array, and use this in vdso_linux.go to compute constants for
  sizing the elf structure arrays traversed in the loaded vDSO.

Change-Id: I1edb4e4ec9f2d79b7533aa95fbd09f771fa4edef
Reviewed-on: https://go-review.googlesource.com/69391
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/vdso_linux.go
src/runtime/vdso_linux_amd64.go [new file with mode: 0644]