|
@@ -466,12 +466,21 @@ int singlestepping(void * t)
|
|
return 2;
|
|
return 2;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * Only x86 and x86_64 have an arch_align_stack().
|
|
|
|
+ * All other arches have "#define arch_align_stack(x) (x)"
|
|
|
|
+ * in their asm/system.h
|
|
|
|
+ * As this is included in UML from asm-um/system-generic.h,
|
|
|
|
+ * we can use it to behave as the subarch does.
|
|
|
|
+ */
|
|
|
|
+#ifndef arch_align_stack
|
|
unsigned long arch_align_stack(unsigned long sp)
|
|
unsigned long arch_align_stack(unsigned long sp)
|
|
{
|
|
{
|
|
if (randomize_va_space)
|
|
if (randomize_va_space)
|
|
sp -= get_random_int() % 8192;
|
|
sp -= get_random_int() % 8192;
|
|
return sp & ~0xf;
|
|
return sp & ~0xf;
|
|
}
|
|
}
|
|
|
|
+#endif
|
|
|
|
|
|
|
|
|
|
/*
|
|
/*
|