Revision 91b40c5b

b/configure
2364 2364
fi
2365 2365

  
2366 2366
if test "$target_user_only" = "yes" -a "$static" = "no" -a \
2367
	"$user_pie" = "yes" ; then
2367
  "$user_pie" = "yes" ; then
2368 2368
  cflags="-fpie $cflags"
2369 2369
  ldflags="-pie $ldflags"
2370
  echo "CONFIG_USER_PIE=y" >> $config_mak
2370 2371
fi
2371 2372

  
2372 2373
if test "$target_softmmu" = "yes" -a \( \
b/linux-user/main.c
48 48
static const char *interp_prefix = CONFIG_QEMU_PREFIX;
49 49
const char *qemu_uname_release = CONFIG_UNAME_RELEASE;
50 50

  
51
/* for recent libc, we add these dummy symbols which are not declared
52
   when generating a linked object (bug in ld ?) */
53
#if ((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && \
54
     !defined(CONFIG_STATIC)) && !defined(CONFIG_USER_PIE)
55
asm(".globl __preinit_array_start\n"
56
    ".globl __preinit_array_end\n"
57
    ".globl __init_array_start\n"
58
    ".globl __init_array_end\n"
59
    ".globl __fini_array_start\n"
60
    ".globl __fini_array_end\n"
61
    ".section \".rodata\"\n"
62
    "__preinit_array_start:\n"
63
    "__preinit_array_end:\n"
64
    "__init_array_start:\n"
65
    "__init_array_end:\n"
66
    "__fini_array_start:\n"
67
    "__fini_array_end:\n"
68
    ".long 0\n"
69
    ".previous\n");
70
#endif
71

  
51 72
/* XXX: on x86 MAP_GROWSDOWN only works if ESP <= address + 32, so
52 73
   we allocate a bigger stack. Need a better solution, for example
53 74
   by remapping the process stack directly at the right place */

Also available in: Unified diff