Skip to content

Commit b859d58

Browse files
authored
Merge pull request #139 from rust-osdev/mov-offset
Fix linker errors on latest nightlies
2 parents a0ade68 + 973ff99 commit b859d58

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
name: "Test"
1515

1616
strategy:
17+
fail-fast: false
1718
matrix:
1819
platform: [
1920
ubuntu-latest,
@@ -83,7 +84,6 @@ jobs:
8384
if [ $? -eq 123 ]; then (exit 0); else (exit 1); fi
8485
shell: 'bash {0}'
8586

86-
8787
build_example_kernel:
8888
name: "Build Example Kernel"
8989
strategy:

Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "bootloader"
3-
version = "0.9.14"
3+
version = "0.9.15"
44
authors = ["Philipp Oppermann <[email protected]>"]
55
license = "MIT/Apache-2.0"
66
description = "An experimental pure-Rust x86 bootloader."

Changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Unreleased
22

3+
# 0.9.15 – 2021-03-07
4+
5+
- Fix linker errors on latest nightlies ([#139](https://github.com/rust-osdev/bootloader/pull/139))
6+
37
# 0.9.14 – 2021-02-24
48

59
- Fix "panic message is not a string literal" warning ([#138](https://github.com/rust-osdev/bootloader/pull/138))

src/stage_1.s

+3-3
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ check_int13h_extensions:
7878
jc no_int13h_extensions
7979

8080
load_rest_of_bootloader_from_disk:
81-
lea eax, _rest_of_bootloader_start_addr
81+
mov eax, offset _rest_of_bootloader_start_addr
8282

8383
# dap buffer segment
8484
mov ebx, eax
@@ -90,10 +90,10 @@ load_rest_of_bootloader_from_disk:
9090
sub eax, ebx
9191
mov [dap_buffer_addr], ax
9292

93-
lea eax, _rest_of_bootloader_start_addr
93+
mov eax, offset _rest_of_bootloader_start_addr
9494

9595
# number of disk blocks to load
96-
lea ebx, _rest_of_bootloader_end_addr
96+
mov ebx, offset _rest_of_bootloader_end_addr
9797
sub ebx, eax # end - start
9898
shr ebx, 9 # divide by 512 (block size)
9999
mov [dap_blocks], bx

src/stage_2.s

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ load_kernel_from_disk:
4040
mov word ptr [dap_blocks], 1
4141

4242
# number of start block
43-
lea eax, _kernel_start_addr
44-
lea ebx, _start
43+
mov eax, offset _kernel_start_addr
44+
mov ebx, offset _start
4545
sub eax, ebx
4646
shr eax, 9 # divide by 512 (block size)
4747
mov [dap_start_lba], eax

0 commit comments

Comments
 (0)