2

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?

Martin L.
  • 3,006
  • 6
  • 36
  • 60

1 Answers1

3

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!

John Bollinger
  • 160,171
  • 8
  • 81
  • 157