I would like to change the starting stack address of a program on linux.
I've checked a bit the kernel source, found out about
extern void start_thread(struct pt_regs *regs, unsigned long new_ip,
unsigned long new_sp);
But I didn't find a way to inluence it from outside (of the kernel).
Ideally some configuration of my OS (debian) for a defined program would be perfect. But I don't know how to do that ...
I know about some stack related function like setrlimit() and ulimit() but that doesn't do the job.
May be gdb has some features like that? (It's not a problem if the program runs inside gdb.)
Since it's a program that I wrote, I also thought about doing a big malloc at program startup and change esp/ebp to point to it. But that's not ideal.
If anybody know some dark features of Linux process creation that would be nice!