Rename main to rust_main to support testing

On testing, `std` is imported, which defines an own `main` function. Thus `cargo test` fails if there alread exists one non-mangled main.
This commit is contained in:
Philipp Oppermann
2015-09-15 14:43:50 +02:00
parent 3030b1c862
commit 5db8977495
2 changed files with 3 additions and 3 deletions

View File

@@ -13,7 +13,7 @@
; limitations under the License.
global long_mode_start
extern main
extern rust_main
section .text
bits 64
@@ -21,7 +21,7 @@ long_mode_start:
call setup_SSE
; call rust main
call main
call rust_main
.os_returned:
; rust main returned, print `OS returned!`
mov rax, 0x4f724f204f534f4f

View File

@@ -21,7 +21,7 @@ extern crate rlibc;
use core::intrinsics::offset;
#[no_mangle]
pub extern fn main() {
pub extern fn rust_main() {
// ATTENTION: we have a very small stack and no guard page
let x = ["Hello", " ", "World", "!"];
let screen_pointer = 0xb8000 as *const u16;