Indeed, it is somewhat odd that we have sections and we have "segments". The former is used by build-time linker and some debugging tools (e.g. if you want your program to map backtrace entries to line numbers). The later is for runtime stuff. Runtime linker and stack-unwinder/exceptions facility. I think "why" is because the latter is somewhat simpler and different enough. E.g. runtime relocations are quite different from build-time relocations. And unwinding has it's own set of "nice" details making it different enough from plain dwarf bits (which reside in some sections).
Power management, mobile and firmware developer on Linux. Security developer at Aurora. Ex-biologist. mjg59 on Twitter. Content here should not be interpreted as the opinion of my employer. Also on Mastodon.
no subject
Date: 2024-01-02 08:36 pm (UTC)