
July 5th, 2010, 12:52 AM
|
|
Registered User
|
|
Join Date: Jul 2010
Posts: 3
Time spent in forums: 5 h 45 m 50 sec
Reputation Power: 0
|
|
|
Assembly Language
My program as follows in assembly and what i have learn and what i have not so help is needed here to make it work
.section .data
data_items:
.string "Mytest\n"
.section .text
.globl _start
_start:
movl $0, %eax
movl $data_items, %ebp
movl %ebp, %eax
movl $11, %eax
movl $80, %edx
movl $data_items, %edi
movl $4, %eax
movl $1, %ebx
movl $data_items, %ecx
int $0x80
movl $1, %eax
movl $0, %ebx
int $0x80
upon executing the program it's output looks like this:
Mytest
.symtab.strtab.shstrtab.text.data
i've used movl $11, %eax system call (execve) to try execute Mytest
when it executes i find from what i learn that the system call execve does not have the identified Tables from the ELF format thus displays .symtab.strtab.shstrtab.text.data. In my version linux the ELF format is in /lib/ld-linux.so.2 so would a simple pointer to the ELF work or do i have it all wrong? Upon assembly i used the ld command is there options for this to link it to the executable Mytest? I'm trying to learn this and how it works any help is greatly appreciated.
|