assembly se linux
Bassoukos Tassos
abas at aix.meng.auth.gr
Wed Apr 28 12:43:56 EEST 1999
On Wed, 28 Apr 1999, The Reverant wrote:
> Hello paides, exo to eksis problima:
> Eno programatiza se assembly se dos, eipa na to giriso
> se linux.
> Opote, mathainontas to kainourgio stil pou grafeis
> assembly se linux,
> egrapsa ena programataki, to opoio ginetai dekto apo
> ton gas me
> "as encdec.asm", diladi den bgazei oute errors oute
> warnings. Tou allazo
> ta permissions gia na einai executable apo emena, alla
> otan to trexo
> (to a.out pou bgazei o gas) me "./a.out" mou bgazei:
> "bash: a.out: Cannot execute binary file"
> Giati afto? Pos to diorthono?
> Simiosi: Apantiste prosopika, giati aftos o
> loagariasmos den einai sti
> lista gia evnooitous (@yahoo.com=s-l-o-w) logous.
> Efharisto prokatabolika
> Dimitris
Geia sou Dimhtrh, kai eisai sigouros oti 8es na to kaneis ayto ?
Me thn C 8a kaneis thn idia douleia pio eykola.
Alla ola me thn seira tous:
Ean kaneis 'file a.out' kata pasa pi8anothta 8a sou pei oti einai
'object
file' kai oxi 'Linux ELF executable, not stripped' (h kati paromoio). To
ekanes link me thn entolh ld me to /usr/lib/crt1.o pou periexei ta
initialization functions. Epishs, ean 8es na kaneis otidhpote pio
polyploko apo to na epistrefeis, 8a xreiasteis ton /lib/ld-linux.so
(dynamic loader) kai isws kai kapoia libc.so (ean 8es c-functions, alla
meta 8a blexeis me ta calling conventions).
Akoma, ean kaneis gcc -o encdec encdec.s gia na ta kanei ayta aytomata
to gcc front-end. (assembling + linking)
Proswpika protimw na grafw ton perissotero kwdika se C kai mono ta
kommatia pou exei nohma na grafoun se assembly ta kanw me to xeri.
Elpizw na boh8hsa.
Tassos
--
Bassoukos Tassos
What goes up, must come down. Ask any system administrator.
--
====================================================================
Gia boithia (h na diagrafhte) e-mail sto majordomo at hellug.gr
Ta archives tis listas einai sto http://lists.hellug.gr/archives
prin steilete kapoia erothsh psakte mipos exei hdh apanththei.
Gia opoiodipote problima stilte e-mail ston owner-linux-greek-users at hellug.gr
====================================================================
More information about the Linux-greek-users
mailing list