diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-11-04 18:06:36 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-11-04 18:06:36 -0800 |
commit | 7016f3ec866da493a82586ea9ea1a0895514b251 (patch) | |
tree | 5e5a79a98662650e2c6cb2f44028256cb3647a0b /src | |
parent | 8cdfca24e3955fd1c340bbc0635e8c442963fe6f (diff) |
fake dladdr
Diffstat (limited to 'src')
-rw-r--r-- | src/library.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js index aec98b2d..52b1fc8e 100644 --- a/src/library.js +++ b/src/library.js @@ -5295,6 +5295,16 @@ LibraryManager.library = { } }, + dladdr: function(addr, info) { + // report all function pointers as coming from this program itself XXX not really correct in any way + var fname = allocate(intArrayFromString("/bin/this.program"), 'i8', ALLOC_NORMAL); // XXX leak + {{{ makeSetValue('addr', 0, 'fname', 'i32') }}}; + {{{ makeSetValue('addr', QUANTUM_SIZE, '0', 'i32') }}}; + {{{ makeSetValue('addr', QUANTUM_SIZE*2, '0', 'i32') }}}; + {{{ makeSetValue('addr', QUANTUM_SIZE*3, '0', 'i32') }}}; + return 1; + }, + // ========================================================================== // pwd.h // ========================================================================== |