lkml.org 
[lkml]   [2005]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: execve-bug ...
On Sun, Jun 12, 2005 at 09:23:06PM +0200, DJ.CnX@phreaker.net wrote:

> shell# nasm -f elf -o new.o new.asm
> shell# ld -o new new.o
> shell# ./new
> Segmentation Fault.
>
>
>
> i even tried to execute the binary i've compiled on 2.6.5.x but it didnt
> work : Segmentation Fault. So i think its a bug in the "execve"-function.

well, fortunately this is not the case or you would have some difficulties
executing your tools. You should find litterature about all the options
you have to pass to 'ld' to use it this way, or simpler : use gcc as the
linker and keep 'main' as your program's entry point, it WILL work.

You should have tried 'strace -i ./new', it would have showed you that
the program pointer is invalid (I see b7f63fae here), while on older
kernels it was still 8048080. This does not necessarily mean there's a
bug in execve(), but most probably that this code would have worked
before because of a side effect and that this side effect has been
closed now.

For instance, you can check asmutils which still works. But please,
don't post newbie asm problems here, this definitely is not the right
list.

Regards,
Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-06-12 22:54    [W:0.092 / U:0.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site