error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/steve/src/intermezzOS/kernel/target/debug/deps/intermezzos-f72332709373820b.0.o" "-o" "/home/steve/src/intermezzOS/kernel/target/debug/deps/intermezzos-f72332709373820b" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/home/steve/src/intermezzOS/kernel/target/debug/deps" "-L" "/home/steve/src/intermezzOS/kernel/target/debug/build/intermezzos-ae49b6d4bcb27c57/out" "-L" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "-l" "boot" "-Wl,--no-whole-archive" "-Wl,-Bdynamic" "/home/steve/src/intermezzOS/kernel/target/debug/deps/libconsole.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libtest-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgetopts-411f48d3.rlib" "/home/steve/src/intermezzOS/kernel/target/debug/deps/libspin-d054d2d05cd86dc1.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libterm-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcollections-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_unicode-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-411f48d3.rlib" "-l" "dl" "-l" "pthread" "-l" "gcc_s" "-l" "pthread" "-l" "c" "-l" "m" "-l" "rt" "-l" "util"
= note: /usr/bin/ld: /home/steve/src/intermezzOS/kernel/target/debug/build/intermezzos-ae49b6d4bcb27c57/out/libboot.a(boot.o): relocation R_X86_64_32 against `.bss' can not be used when making a shared object; recompile with -fPIC
/home/steve/src/intermezzOS/kernel/target/debug/build/intermezzos-ae49b6d4bcb27c57/out/libboot.a(boot.o): error adding symbols: Bad value
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/steve/src/intermezzOS/kernel/target/debug/intermezzos-b45e4ac16f1d637d.0.o" "-o" "/home/steve/src/intermezzOS/kernel/target/debug/intermezzos-b45e4ac16f1d637d" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/home/steve/src/intermezzOS/kernel/target/debug/deps" "-L" "/home/steve/src/intermezzOS/kernel/target/debug/build/intermezzos-ae49b6d4bcb27c57/out" "-L" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "-Wl,-Bdynamic" "/home/steve/src/intermezzOS/kernel/target/debug/deps/librlibc-975886925ea7e4d8.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libtest-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgetopts-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libterm-411f48d3.rlib" "/home/steve/src/intermezzOS/kernel/target/debug/deps/libintermezzos.rlib" "/home/steve/src/intermezzOS/kernel/target/debug/deps/libconsole.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librand-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcollections-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc_jemalloc-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_unicode-411f48d3.rlib" "/home/steve/src/intermezzOS/kernel/target/debug/deps/libspin-d054d2d05cd86dc1.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-411f48d3.rlib" "/home/steve/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-411f48d3.rlib" "-l" "dl" "-l" "pthread" "-l" "gcc_s" "-l" "pthread" "-l" "c" "-l" "m" "-l" "rt" "-l" "util"
= note: /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/Scrt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: error: ld returned 1 exit status
We don't currently have any unit tests here, so it's not a problem, but we should figure this out and fix it.
Someone on IRC told me that the PIC stuff would be fixed if we used gcc to assemble rather than nasm. Unsure though.
bug Help wanted!