Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 5th, 2010, 12:52 AM
C3PO C3PO is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2010
Posts: 3 C3PO User rank is Just a Lowly Private (1 - 20 Reputation Level) 
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.

Reply With Quote
  #2  
Old July 11th, 2010, 03:25 AM
C3PO C3PO is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2010
Posts: 3 C3PO User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 45 m 50 sec
Reputation 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

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > Assembly Language

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap