Skip to content

Commit 06a8714

Browse files
authored
Fix typos. (#133)
1 parent 815f70e commit 06a8714

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

example-crates/tiny/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ instruction, which looks similar:
100100
4000bd: b8 e7 00 00 00 mov $0xe7,%eax
101101
```
102102

103-
Here, the value being loaded is 0xe7, which has the eigth bit set. The x86
103+
Here, the value being loaded is 0xe7, which has the eighth bit set. The x86
104104
`push` instructions immediate field is signed, so `push $0xe7` would need a
105105
4-byte immediate field to zero-extend it. Consequently, using the `push`/`pop`
106106
trick in this case would be longer.
@@ -110,7 +110,7 @@ Next, we enable several link arguments in build.rs:
110110
```rust
111111
// Tell the linker to exclude the .eh_frame_hdr section.
112112
println!("cargo:rustc-link-arg=-Wl,--no-eh-frame-hdr");
113-
// Tell the linker to make the text and data readable and writeable. This
113+
// Tell the linker to make the text and data readable and writable. This
114114
// allows them to occupy the same page.
115115
println!("cargo:rustc-link-arg=-Wl,-N");
116116
// Tell the linker to exclude the `.note.gnu.build-id` section.
@@ -230,7 +230,7 @@ syscall number for `exit` is lower than the number for `exit_group`. For
230230
example, on x86-64, `exit` is 60 while `exit_group` is 231. That would enable
231231
the compiler to use the same `push`/`pop` trick it does for the 42 constant,
232232
saving 2 bytes. In theory origin could have a feature to enable this, however
233-
it's a very minor optimization, and it would introducue undefined behavior if
233+
it's a very minor optimization, and it would introduce undefined behavior if
234234
somehow some thread got created outside of origin, so I chose not to add it.
235235

236236
## Sources

example-crates/tiny/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ fn main() {
77

88
// Tell the linker to exclude the .eh_frame_hdr section.
99
println!("cargo:rustc-link-arg=-Wl,--no-eh-frame-hdr");
10-
// Tell the linker to make the text and data readable and writeable. This
10+
// Tell the linker to make the text and data readable and writable. This
1111
// allows them to occupy the same page.
1212
println!("cargo:rustc-link-arg=-Wl,-N");
1313
// Tell the linker to exclude the `.note.gnu.build-id` section.

src/thread/linux_raw.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ pub unsafe fn create(
506506
)?
507507
.cast::<u8>();
508508

509-
// Make the thread metadata and stack readable and writeable, leaving
509+
// Make the thread metadata and stack readable and writable, leaving
510510
// the guard region inaccessible.
511511
mprotect(
512512
map.add(stack_bottom).cast(),

0 commit comments

Comments
 (0)