A Question on Executable File Formats ELF and PE

Programming, for all ages and all languages.
Locked
jammmie999
Posts: 13
Joined: Sun Feb 06, 2011 4:54 am

A Question on Executable File Formats ELF and PE

Post by jammmie999 »

I have been researching the ELF and PE file formats, but there is one thing that I cannot seem to understand. The .text section contains the executable code, correct? I don't understand what format this code is in. I assume that it is not in the language that the executable. But what is it in? Binary seems the most logical of guesses as it is simply coped into memory to be executed (correct me if I am wrong). But I don't think it is binary as when I open an executable with a text editor I see no binary mostly just random garbage. Could someone please help to clarify.

Thanks
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: A Question on Executable File Formats ELF and PE

Post by Combuster »

I suggest you find a place for beginning programmers. You obviously lack the basics of how computers work. This question is off-topic here.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: A Question on Executable File Formats ELF and PE

Post by Brynet-Inc »

Image
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
AndrewBuckley
Member
Member
Posts: 95
Joined: Thu Jan 29, 2009 9:13 am

Re: A Question on Executable File Formats ELF and PE

Post by AndrewBuckley »

jammmie999 wrote:when I open an executable with a text editor I see no binary mostly just random garbage.
wow.
JuEeHa
Member
Member
Posts: 30
Joined: Thu Mar 10, 2011 4:24 am

Re: A Question on Executable File Formats ELF and PE

Post by JuEeHa »

jammmie999 wrote:when I open an executable with a text editor I see no binary mostly just random garbage.
That random garbage IS binary. Everything in computers is in binary. Even this message. Learn about ascii(or utf-8), machine language and basic programmer knowledge before you ask more questions
Using 700MHz Pentium III machine with 64MB of RAM because I feel like it.
ed implementation in C: main(a){for(;;;){read(0,&a,1);if(a=='\n')write(1,"?\n",2);}}
Locked