Skip to content

Conversation

andre-richter
Copy link
Member

Hi phil,

small PR here:

  • Fixes pwd command substitution in README
  • Fixes target file name in README
  • Makes the target json a bit more intuitive to read by using long option argument for the linker. The short one can be confusing if you have no experience with ld.

By the way, I tried if switching to lld is straight-forward, but it throws an error if you just exchange the linker flavor:

error: linking with `lld` failed: exit code: 1
  |
  = note: "lld" "-flavor" "gnu" "--script=linker.ld" "-L" "/home/arichter/.xargo/lib/rustlib/x86_64-bootloader/lib" "/home/arichter/repos/bootloader/target/x86_64-bootloader/release/deps/bootloader-484e5291b10a3861.bootloader0.rcgu.o" "-o" "/home/arichter/repos/bootloader/target/x86_64-bootloader/release/deps/bootloader-484e5291b10a3861" "--gc-sections" "-L" "/home/arichter/repos/bootloader/target/x86_64-bootloader/release/deps" "-L" "/home/arichter/repos/bootloader/target/release/deps" "-L" "/home/arichter/.xargo/lib/rustlib/x86_64-bootloader/lib" "-Bstatic" "/home/arichter/repos/bootloader/target/x86_64-bootloader/release/deps/librlibc-d40895cb3b906a9b.rlib" "-Bdynamic"
  = note: lld: error: bootloader0-5c45d0f13b04536f6388a70c7a9344c0.rs:(.second_stage+0xA5): unrecognized reloc 13
          lld: error: bootloader0-5c45d0f13b04536f6388a70c7a9344c0.rs:(.second_stage+0x1A2): unrecognized reloc 13
          lld: error: bootloader0-5c45d0f13b04536f6388a70c7a9344c0.rs:(.second_stage+0x1CC): unrecognized reloc 13
          lld: error: bootloader0-5c45d0f13b04536f6388a70c7a9344c0.rs:(.second_stage+0x1F9): unrecognized reloc 13

@andre-richter
Copy link
Member Author

Forgot to add objcopy changes as well. Its now synced with the travis commands. However, #6 still surfaces.

@phil-opp phil-opp merged commit 1d52d1f into rust-osdev:master Mar 19, 2018
@phil-opp
Copy link
Member

Thanks a lot!

By the way, I tried if switching to lld is straight-forward, but it throws an error if you just exchange the linker flavor

Yeah, I experienced that error as well. Seems like lld does not support some required 16-bit relocation yet.

However, #6 still surfaces.

The running instructions were created for an older version of the bootloader. Running it without a kernel is no longer possible. Maybe we could add a hello world kernel to the repo.

@andre-richter andre-richter deleted the misc branch March 19, 2018 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants