Re: Shared libperl.so and build issues
[p5sagit/p5-mst-13.2.git] / ext / DynaLoader / dl_dyld.xs
index 87642ee..45ae10f 100644 (file)
@@ -76,7 +76,7 @@ static void TranslateError
     {
        "%s(%d): Object Image Load Failure\n",
        "%s(%d): Object Image Load Success\n",
-       "%s(%d): Not an recognisable object file\n",
+       "%s(%d): Not a recognisable object file\n",
        "%s(%d): No valid architecture\n",
        "%s(%d): Object image has an invalid format\n",
        "%s(%d): Invalid access (permissions?)\n",
@@ -116,6 +116,7 @@ static char *dlopen(char *path, int mode /* mode is ignored */)
        // NSLinkModule will cause the run to abort on any link error's
        // not very friendly but the error recovery functionality is limited.
        handle = NSLinkModule(ofile, path, TRUE);
+       NSDestroyObjectFileImage(ofile);
     }
 
     return handle;