#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    3
    Rep 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.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2010
    Posts
    3
    Rep Power
    0
    Nevermind i already found the system call to work and ran a program to run the shell, (sh, command), in another program and never knew it, but i can keep this posted as reference to others who might be looking to see what's going on when running a program. Problem solved

IMN logo majestic logo threadwatch logo seochat tools logo