On Fri, Mar 19, 2010 at 12:48:59AM -0700, Jonathan Leto wrote:
> Howdy,
> 
> This looks like a great start. It would be really nice to have a test
> that verifies that this works. Can you think of the simplest possible
> test case that would verify that this works?
> 
> This patch is very important for Blizkost, as I understand it,
> Blizkost cannot load XS-based Perl 5 modules (such as Data::Dumper)
> without this functionality.

The simplest test case that I can think of is something like this:

    $P0 = box 1
    loadlib "test_lib_1", $P0
    loadlib "test_lib_2"
    # If we get this far, it worked

test_lib_1.c

SOMEHOW_EXPORT_FROM_SOLIB void test_symbol(void) {}

test_lib_2.c

SOMEHOW_IMPORT_FROM("test_lib_1" /* iirc windows uses a two-level namespace
    symbols, making RTLD_GLOBAL unneccessary. */)
extern void test_symbol(void);

SOMEHOW_EXPORT_FROM_SOLIB void dont_optimize_me_out(void) {
    test_symbol();
}

...but I have no idea how to put this into reality.

-Stefan

Attachment: signature.asc
Description: Digital signature

_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to