From f6be25a8705b40c2c5127b52479485d904d38b64 Mon Sep 17 00:00:00 2001 From: Marijn Haverbeke Date: Mon, 18 Apr 2011 16:18:55 +0200 Subject: Update foregoing patches to leave rust_crate alone. Apparently it can't live in the main binary, since on non-Linux platforms, dynamics libs won't find symbols in the binary. This removes the crate_map pointer from rust_crate again, and instead passes it as an extra argument to rust_start. Rustboot doesn't pass this argument, but supposedly that's okay as long as we don't actually use it on that platform. --- src/rt/rust.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/rt/rust.cpp') diff --git a/src/rt/rust.cpp b/src/rt/rust.cpp index 013705f2..6a421736 100644 --- a/src/rt/rust.cpp +++ b/src/rt/rust.cpp @@ -78,9 +78,11 @@ command_line_args : public dom_owned extern "C" CDECL int rust_start(uintptr_t main_fn, rust_crate const *crate, int argc, - char **argv) { + char **argv, void* crate_map) { - crate->update_log_settings(getenv("RUST_LOG")); + // Only when we're on rustc is the last argument passed + if (!crate->get_image_base()) + update_log_settings(crate_map, getenv("RUST_LOG")); rust_srv *srv = new rust_srv(); rust_kernel *kernel = new rust_kernel(srv); kernel->start(); -- cgit v1.2.3