Orabug:
20861959
When building the userspace parts of the vDSO code, we have to dike out things
from the various kernel headers we use that generate register relocations,
since we cannot handle relocations in the vDSO. The principal such thing is
current_thread_info(), which we used to dike out entirely -- but in the -rt
patchset, a lot of things in the headers reference this. So, instead,
simply have current_thread_info() generate nonsense code that doesn't emit
a relocation, so that its users still compile (though they would never
work -- but that's not important, since they are never used).
Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
(cherry picked from commit
4f9b3c6e7fe105ea04f89794007f97b43a63c897)
#ifndef BUILD_VDSO
/* how to get the thread information struct from C */
register struct thread_info *current_thread_info_reg asm("g6");
-#define current_thread_info() (current_thread_info_reg)
+#else
+/*
+ * It doesn't matter if we genreate nonsense code, since the vDSO
+ * will never use anything that references this macro: but we must
+ * not do anything that produces a register relocation.
+ */
+static struct thread_info *current_thread_info_reg = 0;
#endif
+#define current_thread_info() (current_thread_info_reg)
+
/*
* thread information allocation
*/
#ifndef BUILD_VDSO
/* how to get the thread information struct from C */
register struct thread_info *current_thread_info_reg asm("g6");
-#define current_thread_info() (current_thread_info_reg)
+#else
+/*
+ * It doesn't matter if we genreate nonsense code, since the vDSO
+ * will never use anything that references this macro: but we must
+ * not do anything that produces a register relocation.
+ */
+static struct thread_info *current_thread_info_reg = 0;
#endif
+#define current_thread_info() (current_thread_info_reg)
+
/* thread information allocation */
#if PAGE_SHIFT == 13
#define THREAD_SIZE_ORDER 1
*/
#define TS_RESTORE_SIGMASK 0x0001 /* restore signal mask in do_signal() */
-#if !defined(__ASSEMBLY__) && !defined(BUILD_VDSO)
+#if !defined(__ASSEMBLY__)
#define HAVE_SET_RESTORE_SIGMASK 1
static inline void set_restore_sigmask(void)
{