Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was wondering what are some formats of object files in Linux?

There are two types of object files that I know:

  1. executable, which has ELF format
  2. object files that are generated by gcc after compilation but before linkage.

    what is the format of such object files?

    Or are they also ELF format but with some different sub-formats than executables?

    Is the job of a linker to convert the format of this type of object files into the format of executables?

  3. Are there other types of object files?
share|improve this question
There's the now mostly obsolete a.out format (no longer used hence not in an answer). – jw013 Aug 5 '11 at 21:50

Yes! They are also ELF. They are referred to as ELF object files.

share|improve this answer

Core dumps are also object files, of a sort, and usually in ELF format, too. Running this program will probably produce a file named "core":

main(int ac, char **av)
        char *p = 0;
        *p = 'a';
        return 0;

My file command says:

core: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style, from './dump'
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.