1 #include "linux/threads.h"
2 #include "linux/stddef.h" // for NULL
3 #include "linux/elf.h" // for AT_NULL
5 /* The following function nicked from arch/ppc/kernel/process.c and
8 * XXX ld.so expects the auxiliary table to start on
9 * a 16-byte boundary, so we have to find it and
12 void shove_aux_table(unsigned long sp)
17 unsigned long aux_start, offset;
20 sp += sizeof(int) + (argc + 1) * sizeof(char *);
21 /* skip over the environment pointers */
27 /* skip to the end of the auxiliary table */
29 e = *(unsigned long *)sp;
30 sp += 2 * sizeof(unsigned long);
31 } while (e != AT_NULL);
32 offset = ((aux_start + 15) & ~15) - aux_start;
35 sp -= sizeof(unsigned long);
36 e = *(unsigned long *)sp;
37 *(unsigned long *)(sp + offset) = e;
38 } while (sp > aux_start);
41 /* END stuff taken from arch/ppc/kernel/process.c */
45 * Overrides for Emacs so that we follow Linus's tabbing style.
46 * Emacs will notice this stuff at the end of the file and automatically
47 * adjust the settings for this buffer only. This must remain at the end
49 * ---------------------------------------------------------------------------
51 * c-file-style: "linux"