diff options
| author | Marijn Haverbeke <[email protected]> | 2011-04-18 16:18:55 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <[email protected]> | 2011-04-18 16:21:49 +0200 |
| commit | f6be25a8705b40c2c5127b52479485d904d38b64 (patch) | |
| tree | dc569bf01f47e01e70c8820a7a6341ac229154dd /src/rt/rust.cpp | |
| parent | Add a -c option. (diff) | |
| download | rust-f6be25a8705b40c2c5127b52479485d904d38b64.tar.xz rust-f6be25a8705b40c2c5127b52479485d904d38b64.zip | |
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.
Diffstat (limited to 'src/rt/rust.cpp')
| -rw-r--r-- | src/rt/rust.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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<command_line_args> 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(); |