使い方から見て、alloc_trampolineのプロトタイプは「extern __TR_function alloc_trampoline (__TR_function, void*, void*);」ではなくて、「extern __TR_function alloc_trampoline (__TR_function, void**, void*);」であるべきだと思う。
*** Warning: This library needs some functionality provided by -ltrampoline. *** I have the capability to make that library automatically link in when *** you link to this library. But I can only do this if you have a *** shared version of the library, which you do not appear to have. *** Warning: libtool could not satisfy all declared inter-library *** dependencies of module librubymod. Therefore, libtool will create *** a static module, that should work as long as the dlopening *** application is linked with the -dlopen flag.