[fpc-devel] Quick question on VMT / writeable or protected memory
jonas at freepascal.org
Wed Apr 14 08:40:00 CEST 2021
On 14/04/2021 01:22, Martin Frb via fpc-devel wrote:
> Opening a can of worms here. But leaving all pitfalls aside.
> If one wanted to write to the VMT of a class, would that be possible?
> Would the VMT be stored in write-able memory, once the exe is loaded?
It depends on the platforms. Most platforms support read-only
relocatable memory, so they can make it permanently read-only after the
(dynamic) linker has relocated everything. I don't know which ones do/don't.
More information about the fpc-devel