summaryrefslogtreecommitdiff
path: root/load.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-05-14 22:53:42 -0400
committerPaul Smith <psmith@gnu.org>2013-05-14 22:53:42 -0400
commitb7041cbb385e9a35a6ba2da69bf9cffbce678eee (patch)
tree07578812e5d846bc943a114db1c3f37a99079982 /load.c
parent437d162d3f4a7f1aa0609c5a515f4bd3c40d2a2f (diff)
downloadmake-b7041cbb385e9a35a6ba2da69bf9cffbce678eee.tar.gz
Add requirement for plugin_is_GPL_compatible symbol in loaded objects.
Diffstat (limited to 'load.c')
-rw-r--r--load.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/load.c b/load.c
index f20c1c79..655928ad 100644
--- a/load.c
+++ b/load.c
@@ -71,6 +71,12 @@ load_object (const gmk_floc *flocp, int noerror,
return NULL;
}
+ /* Assert that the GPL license symbol is defined. */
+ symp = dlsym (*dlp, "plugin_is_GPL_compatible");
+ if (! symp)
+ fatal (flocp, _("Loaded object %s is not declared to be GPL compatible"),
+ ldname);
+
symp = dlsym (*dlp, symname);
if (! symp)
fatal (flocp, _("Failed to load symbol %s from %s: %s"),