+ info_c_file = maybe_temp_file(ctx, ".c", false, "_info");
+ fd = open(info_c_file, O_WRONLY|O_CREAT|O_EXCL, 0600);
+ if (fd < 0)
+ return NULL;
+ if (!write_all(fd, info, len))
+ return NULL;
+
+ if (close(fd) != 0)
+ return NULL;
+
+ ccandir = talloc_dirname(ctx, dir);
+ *strrchr(ccandir, '/') = '\0';
+
+ compiled = maybe_temp_file(ctx, "", false, "info");
+ if (compile_and_link(ctx, info_c_file, ccandir, "",
+ CCAN_COMPILER, CCAN_CFLAGS, "",
+ compiled, &output))
+ return compiled;
+ return NULL;