Skip to content
Snippets Groups Projects
Commit 361f1e16 authored by Tom Lane's avatar Tom Lane
Browse files

Pass less-unsafe parameters to Darwin's NSLinkModule. While this change...

Pass less-unsafe parameters to Darwin's NSLinkModule.  While this change prevents a backend coredump when loading a broken shlib, it also seems to suppress the error messages that might help debug the problem :-(.  Perhaps someone would like to supply a 'linkEdit' hook to get the best of both worlds.  But in the meantime, backend crash trumps error reporting.
parent 1a443177
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
* available with a PostgreSQL-compatible license. Kudos Wilfredo
* Snchez <wsanchez@apple.com>.
*
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/darwin.c,v 1.5 2001/03/22 03:59:42 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/darwin.c,v 1.6 2002/10/01 05:06:44 tgl Exp $
*/
#include "postgres.h"
......@@ -18,7 +18,9 @@ pg_dlopen(char *filename)
if (NSCreateObjectFileImageFromFile(filename, &image) !=
NSObjectFileImageSuccess)
return NULL;
return NSLinkModule(image, filename, TRUE);
return NSLinkModule(image, filename,
NSLINKMODULE_OPTION_BINDNOW |
NSLINKMODULE_OPTION_RETURN_ON_ERROR);
}
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment