Sujet : Re: Memory protection between compilation units?
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.cDate : 11. Jun 2025, 16:36:47
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250611083340.906@kylheku.com>
References : 1
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2025-06-11, Mateusz Viste <
mateusz@x.invalid> wrote:
How would you approach this?
Custom linker script which aligns the static area address of each module
to a page size, and introduces a dummy page-sized object.
Then at program load time, we iterate over these, and unmap the dummy
pages.
We might also have to think about perhaps coalescing the
non-zero-initialized and zero-initialized ("BSS") data. Or, rather than
saying coalescing, perhaps not separating the two. Or else separate
implementing the strategy for the two areas: have unmapped pages in the
"BSS" area as well as the initialized data.
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca