Why?
Walter Bright
newshound2 at digitalmars.com
Wed Apr 10 03:49:39 UTC 2024
On 4/9/2024 12:11 PM, Richard (Rikki) Andrew Cattermole wrote:
> On 10/04/2024 7:04 AM, Walter Bright wrote:
>> On 4/9/2024 10:22 AM, Richard (Rikki) Andrew Cattermole wrote:
>>> Address randomization, Windows remapping of symbols at runtime (with state
>>> that is kept around so you can do it later), all suggest it isn't like that now.
>>
>> Code generation has changed to be PIC (Position Independent Code) so this is
>> workable.
>
> From Windows Internals 5 and WinAPI docs, it seems as though it does memory map
> initially. But the patching will activate CoW, so in effect it isn't memory
> mapped if you need to patch.
Right, so the executable is designed to not need patching.
> If you don't need to patch? Who cares how much ROM is used! Don't be afraid to
> use 256kb in a single table. Just don't use pointers... no matter what and it'll
> be shared.
Instead of using pointers, use offsets from the beginning of the file.
More information about the Digitalmars-d
mailing list