Created
October 15, 2011 14:11
-
-
Save banister/1289619 to your computer and use it in GitHub Desktop.
using LD_PRELOAD to override functions like rb_raise() in ruby with my own definitions in an .so
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you set LD_PRELOAD to the path of a shared object, that file will be loaded before any other library (including the C runtime, libc.so). So to run ls with a your special malloc() implementation, do this: | |
$ LD_PRELOAD=/path/to/my/malloc.so /bin/ls |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment