--- Comment #5 from pinskia at gcc dot gnu dot org 2006-11-28 14:01 ---
try something like:
((void(*)(void))shell) ()
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30002
--- Comment #4 from blacklight86 at gmail dot com 2006-11-28 13:57 ---
How can I start the shellcode then?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30002
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-11-28 13:50 ---
Runtime address != link time address which is what is causing the issue.
Basicially you should not do this.
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
--- Comment #2 from blacklight86 at gmail dot com 2006-11-28 13:48 ---
This is what I do and what I get:
[EMAIL PROTECTED]:~/prog/shell$ gcc -o vuln vuln.c
[EMAIL PROTECTED]:~/prog/shell$ ./vuln
0x8049600
Segmentation fault
Where 0x8049600 is the address of my shellcode, obtained this
--- Comment #1 from pinskia at gcc dot gnu dot org 2006-11-27 21:33 ---
Why do you think this will work?
The linker is what places the address and since you have not shown how you used
a linker script and for sure that the shell is placed at 0x08049600 I don't
trust this at all.
Also I b