Re: What's the fastest way to check if a slice points to static data

ketmar via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Jun 24 11:46:06 PDT 2017


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.


More information about the Digitalmars-d-learn mailing list