From 7ce0716103b6d8275c8cb6d98307632db26ad82c Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Sun, 21 Aug 2016 07:28:38 +0000 Subject: Rewrite the vDSOs for CloudABI in assembly. The reason why the old vDSOs were written in C using inline assembly was purely because they were embedded in the C library directly as static inline functions. This was practical during development, because it meant you could invoke system calls without any library dependencies. The vDSO was simply a copy of these functions. Now that we require the use of the vDSO, there is no longer any need for embedding them in C code directly. Rewriting them in assembly has the advantage that they are closer to ideal (less useless branching, less assumptions about registers remaining unclobbered by the kernel, etc). They are also easier to build, as they no longer depend on the C type information for CloudABI. Obtained from: https://github.com/NuxiNL/cloudabi --- sys/conf/files.amd64 | 4 ++-- sys/conf/files.arm64 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/conf') diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index b9c6c67f9665..7adceccdb64f 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -9,8 +9,8 @@ # # cloudabi64_vdso.o optional compat_cloudabi64 \ - dependency "$S/contrib/cloudabi/cloudabi_vdso_x86_64.c" \ - compile-with "${CC} -shared -nostdinc -nostdlib -Wl,-T$S/compat/cloudabi64/cloudabi64_vdso.lds.s -D_KERNEL -I. -I$S -I$S/contrib/cloudabi -O2 -fomit-frame-pointer $S/contrib/cloudabi/cloudabi_vdso_x86_64.c -o ${.TARGET}" \ + dependency "$S/contrib/cloudabi/cloudabi_vdso_x86_64.S" \ + compile-with "${CC} -x assembler-with-cpp -shared -nostdinc -nostdlib -Wl,-T$S/compat/cloudabi64/cloudabi64_vdso.lds.s $S/contrib/cloudabi/cloudabi_vdso_x86_64.S -o ${.TARGET}" \ no-obj no-implicit-rule \ clean "cloudabi64_vdso.o" # diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 31acaf9ce32f..631dab2cb1f2 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -1,7 +1,7 @@ # $FreeBSD$ cloudabi64_vdso.o optional compat_cloudabi64 \ - dependency "$S/contrib/cloudabi/cloudabi_vdso_aarch64.c" \ - compile-with "${CC} -shared -nostdinc -nostdlib -Wl,-T$S/compat/cloudabi64/cloudabi64_vdso.lds.s -D_KERNEL -I. -I$S -I$S/contrib/cloudabi -O2 -fomit-frame-pointer $S/contrib/cloudabi/cloudabi_vdso_aarch64.c -o ${.TARGET}" \ + dependency "$S/contrib/cloudabi/cloudabi_vdso_aarch64.S" \ + compile-with "${CC} -x assembler-with-cpp -shared -nostdinc -nostdlib -Wl,-T$S/compat/cloudabi64/cloudabi64_vdso.lds.s $S/contrib/cloudabi/cloudabi_vdso_aarch64.S -o ${.TARGET}" \ no-obj no-implicit-rule \ clean "cloudabi64_vdso.o" # -- cgit v1.2.3