Commit 47ea8dd8 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin:
 "A couple of further build fixes for the VDSO code.

  This is turning into a bit of a headache, and Andy has already come up
  with a more ultimate cleanup, but most likely that is 3.17 material"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86-32, vdso: Fix vDSO build error due to missing align_vdso_addr()
  x86-64, vdso: Fix vDSO build breakage due to empty .rela.dyn
parents bae78dc2 d093601b
...@@ -93,6 +93,9 @@ static void BITSFUNC(copy_section)(struct BITSFUNC(fake_sections) *out, ...@@ -93,6 +93,9 @@ static void BITSFUNC(copy_section)(struct BITSFUNC(fake_sections) *out,
uint64_t flags = GET_LE(&in->sh_flags); uint64_t flags = GET_LE(&in->sh_flags);
bool copy = flags & SHF_ALLOC && bool copy = flags & SHF_ALLOC &&
(GET_LE(&in->sh_size) ||
(GET_LE(&in->sh_type) != SHT_RELA &&
GET_LE(&in->sh_type) != SHT_REL)) &&
strcmp(name, ".altinstructions") && strcmp(name, ".altinstructions") &&
strcmp(name, ".altinstr_replacement"); strcmp(name, ".altinstr_replacement");
......
...@@ -62,6 +62,9 @@ struct linux_binprm; ...@@ -62,6 +62,9 @@ struct linux_binprm;
Only used for the 64-bit and x32 vdsos. */ Only used for the 64-bit and x32 vdsos. */
static unsigned long vdso_addr(unsigned long start, unsigned len) static unsigned long vdso_addr(unsigned long start, unsigned len)
{ {
#ifdef CONFIG_X86_32
return 0;
#else
unsigned long addr, end; unsigned long addr, end;
unsigned offset; unsigned offset;
end = (start + PMD_SIZE - 1) & PMD_MASK; end = (start + PMD_SIZE - 1) & PMD_MASK;
...@@ -83,6 +86,7 @@ static unsigned long vdso_addr(unsigned long start, unsigned len) ...@@ -83,6 +86,7 @@ static unsigned long vdso_addr(unsigned long start, unsigned len)
addr = align_vdso_addr(addr); addr = align_vdso_addr(addr);
return addr; return addr;
#endif
} }
static int map_vdso(const struct vdso_image *image, bool calculate_addr) static int map_vdso(const struct vdso_image *image, bool calculate_addr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment