a.out replaced by ELF file format?

前端 未结 2 1344
南笙
南笙 2021-02-05 17:43

I have a few questions:

  • Why was a.out replaced by ELF?
  • What were the major flaws in the a.out format that led to the raise of EL
2条回答
  •  离开以前
    2021-02-05 18:21

    As I recall, one of the original problems with a.out format is that it only supported three sections: text, data, and bss. ELF allows any number (or at least many more). The a.out header format was very simple, something like:

    word 
    word 
    word 
    word 
    

    The ELF format, in contrast, has section headers, with names, sizes, etc.

    Having more sections allows for the standard sections, but also gives us const sections, constructor sections, and even one section per function, if we want it.

提交回复
热议问题