LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-30-2003, 12:48 PM   #1
benjaminrtz
Member
 
Registered: Jul 2002
Location: India
Distribution: Ubuntu, Gentoo
Posts: 99

Rep: Reputation: 15
ELF and a.out


Whats the different between ELF and a.oit format ?


When a compile a c code woth gcc

, what's that ELF or a.out format
 
Old 04-30-2003, 05:19 PM   #2
mhearn
Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 47
ELF is what we've used since about '95, iirc.

a.out is a much older format, that doesn't support dynamic linking.

Use gcc -o foo foo.c to generate an executable. The file program will tell you what type it is. gcc will always generate ELF by default, ignore the file name
 
Old 05-01-2003, 04:54 AM   #3
benjaminrtz
Member
 
Registered: Jul 2002
Location: India
Distribution: Ubuntu, Gentoo
Posts: 99

Original Poster
Rep: Reputation: 15
So these days gcc compiled ti into ELF format By default .
How about cc
 
Old 05-01-2003, 08:19 AM   #4
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
On most systems cc is symlinked to gcc now. cc=gcc

Check yours:
whereis cc
ls -l /path/to/cc

Mine:
Code:
bash-2.05a$ whereis cc
cc: /usr/bin/cc /usr/man/man1/cc.1.gz /usr/share/man/man1/cc.1.gz
bash-2.05a$ ls -l /usr/bin/cc
lrwxrwxrwx    1 root     root            3 Nov 16 03:29 /usr/bin/cc -> gcc
bash-2.05a$
Cool
 
Old 05-01-2003, 10:17 AM   #5
benjaminrtz
Member
 
Registered: Jul 2002
Location: India
Distribution: Ubuntu, Gentoo
Posts: 99

Original Poster
Rep: Reputation: 15
Thank you,

I never bother to check that out
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ncurses for arm-elf Juanfran Programming 4 09-19-2005 08:43 AM
.elf format..how to? arunsri Linux - Software 2 03-13-2005 08:14 AM
can't find ld-elf.so.1 degraffenried13 Linux - General 3 12-05-2004 09:47 AM
ELF Files tim_l Linux - Software 0 10-21-2003 09:35 AM
ELF format and other formats? Manish Programming 3 02-25-2002 08:17 PM


All times are GMT -5. The time now is 10:13 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration