Hacker News new | past | comments | ask | show | jobs | submit login

Your last line more or less captures my "intent".

The idea is that if someone can reconsider the need for shared libraries, then could she also reconsider the need for ELF?

But maybe there are other pertinent reasons that ELF exists, besides shared libraries?




I already answered that very directly:

> ELF is the current modern standard file format for specifying executables. It's just how you store executable machine code in a way that Linux/Unix systems know how to load the program into RAM and begining execution.

There is no other way to implement executables. And if there were, it would look just like ELF, from twenty thousand feet.

ELF has nothing in particular to do with shared libraries, and shared libraries still exist if ELF does not, they just have some implementation difficulties in some cases.

It's like saying, what if you didn't need any networking code, would you still need ELF? Yes you would. What if you didn't need GUI code? Yes, you still need executables.

You seem to have gotten a misconception about ELF really fixed in your mind. It is the one and only way to store executables. Without it, you have no tools, no commands, no apps, no way to run any software, no nothing.

Shared libraries are a small side feature and don't have very much to do with ELF, despite the fact that ELF made it easier to implement them.

Also, I mentioned that people have questioned the need for shared libraries, but I fail to see any motivation whatsoever for why anyone might want to get rid of ELF.


    What is ELF? (top)

   ELF is a binary format designed to support dynamic objects
 and shared libraries. On older COFF and ECOFF systems,
 dynamic support and shared libraries were not naturally
 supported by the underlying format, leading to dynamic
 implementations that were at times complex, quirky, and
 slow.
source: netbsd.org

However you said "ELF has nothing in particular to do with shared libraries..."

Perhaps the concept of a binary format has nothing in particular to do with support for shared libaries. Perhaps that is a design choice. And perhaps ELF is merely one approach to the design of a binary format.

If true, then this choice makes a lot of sense in a world where there is a compelling need to use shared libraries, such as the computing world 20 years ago. But I am not so sure the same holds true in a world where the need for shared libraries is "questionable".

You said "Shared libraries are a small side feature..."

If that is true (cites to articles appreciated), then I would be curious what are ELF's "main" features, and how these differ from the formats that preceded ELF (e.g., a.out). Also I would be curious how frequently ELF's "minor" features have historically been used in practice, as opposed to just adding complexity and taking up space.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: