x86/vdso fix for v3.16
Hi Linus,
This fixes building the vdso code on older Linux systems, and probably some non-Linux systems.
The following changes since commit a0abcf2e8f8017051830f738ac1bf5ef42703243:
Merge branch 'x86/vdso' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next (2014-06-05 08:05:29 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86-vdso-for-linus
for you to fetch changes up to bdfb9bcc25005d06a9c301830bdeb7ca5a0b6ef7:
x86, vdso: Use <tools/le_byteshift.h> for littleendian access (2014-06-06 14:54:54 -0700)
----------------------------------------------------------------
H. Peter Anvin (1):
x86, vdso: Use <tools/le_byteshift.h> for littleendian access
arch/x86/vdso/Makefile | 1 + arch/x86/vdso/vdso2c.c | 10 ++++---- arch/x86/vdso/vdso2c.h | 62 +++++++++++++++++++++++++------------------------- 3 files changed, 38 insertions(+), 35 deletions(-)
arch/x86/vdso/Makefile +1 -0
@@ -59,6 +59,7 @@ VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \ $(obj)/vdso64.so.dbg: $(src)/vdso.lds $(vobjs) FORCE $(call if_changed,vdso) +HOST_EXTRACFLAGS += -I$(srctree)/tools/include hostprogs-y += vdso2c quiet_cmd_vdso2c = VDSO2C $@
arch/x86/vdso/vdso2c.c +6 -4
@@ -11,6 +11,8 @@#include <sys/mman.h> #include <sys/types.h> +#include <tools/le_byteshift.h> +#include <linux/elf.h> #include <linux/types.h>
@@ -56,12 +58,12 @@ static void fail(const char *format, ...)*/ #define GLE (x, bits, ifnot) \ __builtin_choose_expr( \ - (sizeof(x) == bits/8), \ - (__typeof__(x))le##bits##toh(x), ifnot) + (sizeof(*(x)) == bits/8), \ + (__typeof__(*(x)))get_unaligned_le##bits(x), ifnot) -extern void bad_get_le (uint64_t ); +extern void bad_get_le (void );#define LAST_LE (x) \ - __builtin_choose_expr(sizeof(x) == 1, (x), bad_get_le(x)) + __builtin_choose_expr(sizeof(*(x)) == 1, *(x), bad_get_le())#define GET_LE (x) \ GLE(x, 64, GLE(x, 32, GLE(x, 16, LAST_LE(x))))
arch/x86/vdso/vdso2c.h +31 -31
116 lines not on this page · raw message