|
From: Nicholas N. <nj...@ca...> - 2004-05-25 15:49:08
|
Hi, I'm confused about dynamic linking, and how Valgrind copes with it. As I understand it, for shared objects there's a table containing an entry for each exported function. Calls to functions jump to the relevant entry in the table. First time this happens, the entry jumps to the dynamic linker which does some stuff and patches the entry to now jump to the actual function. Subsequent calls go through the table straight to the function. Question is: Valgrind doesn't detect self-modifying code. When the jump table is patched, Valgrind won't (I would have thought) detect it and so the now-out-of-date translation for the original pre-patched code should (I would have thought) be run again next time the function is called. But this doesn't happen, so I'm clearly missing something. Could anyone enlighten me? Thanks. N |