Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix linker errors on latest nightlies #139

Merged
merged 15 commits into from
Mar 7, 2021
Merged
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
name: "Test"

strategy:
fail-fast: false
matrix:
platform: [
ubuntu-latest,
Expand Down Expand Up @@ -83,7 +84,6 @@ jobs:
if [ $? -eq 123 ]; then (exit 0); else (exit 1); fi
shell: 'bash {0}'


build_example_kernel:
name: "Build Example Kernel"
strategy:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bootloader"
version = "0.9.14"
version = "0.9.15"
authors = ["Philipp Oppermann <[email protected]>"]
license = "MIT/Apache-2.0"
description = "An experimental pure-Rust x86 bootloader."
Expand Down
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Unreleased

# 0.9.15 – 2021-03-07

- Fix linker errors on latest nightlies ([#139](https://github.com/rust-osdev/bootloader/pull/139))

# 0.9.14 – 2021-02-24

- Fix "panic message is not a string literal" warning ([#138](https://github.com/rust-osdev/bootloader/pull/138))
Expand Down
6 changes: 3 additions & 3 deletions src/stage_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ check_int13h_extensions:
jc no_int13h_extensions

load_rest_of_bootloader_from_disk:
lea eax, _rest_of_bootloader_start_addr
mov eax, offset _rest_of_bootloader_start_addr

# dap buffer segment
mov ebx, eax
Expand All @@ -90,10 +90,10 @@ load_rest_of_bootloader_from_disk:
sub eax, ebx
mov [dap_buffer_addr], ax

lea eax, _rest_of_bootloader_start_addr
mov eax, offset _rest_of_bootloader_start_addr

# number of disk blocks to load
lea ebx, _rest_of_bootloader_end_addr
mov ebx, offset _rest_of_bootloader_end_addr
sub ebx, eax # end - start
shr ebx, 9 # divide by 512 (block size)
mov [dap_blocks], bx
Expand Down
4 changes: 2 additions & 2 deletions src/stage_2.s
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ load_kernel_from_disk:
mov word ptr [dap_blocks], 1

# number of start block
lea eax, _kernel_start_addr
lea ebx, _start
mov eax, offset _kernel_start_addr
mov ebx, offset _start
sub eax, ebx
shr eax, 9 # divide by 512 (block size)
mov [dap_start_lba], eax
Expand Down