On ELF, Part 2 (2018)
kestrelcomputer.github.io
On ELF, Part 2 (2018)
1–10 of 36 posts
Re: On ELF, Part 2 (2018)
#2Re: On ELF, Part 2 (2018)
#3Correct URL: https://kestrelcomputer.github.io/kestrel/2018/01/29/on-elf
Re: On ELF, Part 2 (2018)
#4Re: On ELF, Part 2 (2018)
#5This is all well and good, but in reality everyone is using all the rich features of ELF -- dynamic linking obviously, but also symbol versioning, constructors, symbol interposition (probably the worst one for performance), symbol visibility, preload, etc. The question is how to make it fast in the common case, and actually the Linux and glibc authors are doing a pretty good job here.
Re: On ELF, Part 2 (2018)
#6Re: On ELF, Part 2 (2018)
#7The link to part 1 in part 2 seems to be incorrect. Correct URL: https://kestrelcomputer.github.io/kestrel/2018/01/29/on-elf
Re: On ELF, Part 2 (2018)
#8This is all well and good, but in reality everyone is using all the rich features of ELF -- dynamic linking obviously, but also symbol versioning, constructors, symbol interposition (probably the worst one for performance), symbol visibility, preload, etc. The question is how to make it fast in the common case, and actually the Linux and glibc authors are doing a pretty good job here.
For instance, symbol versioning is just an ad-hoc convention for embedding version numbers into the symbol strings themselves. And the convention assumes that the source language is C, which requires other languages to mangle their symbols to make them fit.
Some features that systems rely on are not even officially documented. I've read accounts from a developer of a linker who had to read through code, blogs and old mailing lists to figure out the actual format for a feature.
Re: On ELF, Part 2 (2018)
#9I worked with a.out on early unixes and elf on later ones - not addressed here is the main reason for switching: ELF allowed you manage pages contiguously on disk so that they could be paged in directly (stuff can be page aligned within the file at it's natural offsets), while a.out was designed for swapped kernels where you would just read() data into a text section, address 0 might be 32 bytes from the start of a f…
Re: On ELF, Part 2 (2018)
#10This is all well and good, but in reality everyone is using all the rich features of ELF -- dynamic linking obviously, but also symbol versioning, constructors, symbol interposition (probably the worst one for performance), symbol visibility, preload, etc. The question is how to make it fast in the common case, and actually the Linux and glibc authors are doing a pretty good job here.
I am still hoping for someone else to implement that so I occasionally mention the idea :)