LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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
LQ Guru
 
Registered: Nov 2002
Location: Durham, England
Distribution: Fedora Core 4
Posts: 1,565

Rep: Reputation: 57
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
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:46 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration