What's the fastest way to check if a slice points to static data
via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jun 24 12:04:06 PDT 2017
On Saturday, 24 June 2017 at 18:46:06 UTC, ketmar wrote:
> Petar Kirov [ZombineDev] wrote:
>
>> Oh, I should have mentioned that I don't expect anything but
>> ugly platform-specific hacks possibly involving the object
>> file format ;)
>> Just enough of them to claim that the solution is somewhat
>> cross-platform :D
>
> i guess you can loot at how TSL scanning is done in druntime
> (at least on GNU/Linux). it does some parsing of internal
> structures of loaded ELF. i guess you can parse section part of
> the loaded ELF too, to find out r/o sections and their address
> ranges.
that's the stuff :P
More information about the Digitalmars-d-learn
mailing list