Is it possible to intercept primitive operations (+,-,% etc.) like this one, with LD_PRELOAD?
int64_t endWhenNsec = startWhenNsec + gTimeLimitSec;
If not, any way to achieve something similar?
Is it possible to intercept primitive operations (+,-,% etc.) like this one, with LD_PRELOAD?
int64_t endWhenNsec = startWhenNsec + gTimeLimitSec;
If not, any way to achieve something similar?
No. Primitive operators are compiled directly to machine code. There is no library involved, so preloading libraries cannot alter their behavior. What a mess if it could!