BSD: Problems executing an assembly program
OK, what I'm gonna write here is not very much programming related, but I hope some of you may know where is the problem.
I run NetBSD(i386) with kernel GENERIC.MPACPI. Every time, I run an assembly program, I get: Quote:
Quote:
PS: I get the same error when I use the GENERIC kernel (the kernel that comes with NetBSD). |
Run the program under gdb, grab the assember listing, and have a blast!
|
I runned it under gdb too, but program receives signal SIGEGV (Segmentation fault), as soon as the first item after _start label gets to be executed.
Example: Code:
... Output I receive in GDB: Quote:
|
Well.. isn't THAT clear.
|
@introuble: I don't see why did you bother to post
|
I want to add something in case I was misunderstood: whatever assembly code I use, the binary crashes.
Don't you have at least an idea what could cause this problem? |
After googling pretty much, I found out I should disable SVR4 emulation. source
Then, I expected like my programs to run normally, but, unfortunately, it didn't happen. For example, the program below should return 0, but it returns 20 in sh and 16 in bash. Code:
header to force netbsd to recognise program as a netbsd binary Quote:
|
Well, no one answered. Could someone move this thread to BSD section? Thanks!
|
All times are GMT -5. The time now is 01:12 AM. |