diff options
Diffstat (limited to 'src/doc')
5 files changed, 10 insertions, 5 deletions
diff --git a/src/doc/rustc/src/platform-support/android.md b/src/doc/rustc/src/platform-support/android.md index 96499b0d801..54e7ddca32a 100644 --- a/src/doc/rustc/src/platform-support/android.md +++ b/src/doc/rustc/src/platform-support/android.md @@ -65,4 +65,4 @@ Currently the `riscv64-linux-android` target requires the following architecture ### aarch64-linux-android on Nightly compilers As soon as `-Zfixed-x18` compiler flag is supplied, the [`ShadowCallStack` sanitizer](https://releases.llvm.org/7.0.1/tools/clang/docs/ShadowCallStack.html) -instrumentation is also made avaiable by supplying the second compiler flag `-Zsanitizer=shadow-call-stack`. +instrumentation is also made available by supplying the second compiler flag `-Zsanitizer=shadow-call-stack`. diff --git a/src/doc/rustc/src/platform-support/riscv64gc-unknown-linux-gnu.md b/src/doc/rustc/src/platform-support/riscv64gc-unknown-linux-gnu.md index 1acc0584be9..b57083980d2 100644 --- a/src/doc/rustc/src/platform-support/riscv64gc-unknown-linux-gnu.md +++ b/src/doc/rustc/src/platform-support/riscv64gc-unknown-linux-gnu.md @@ -122,7 +122,7 @@ limactl shell riscv Using [Docker (with BuildKit)](https://docs.docker.com/build/buildkit/) the [`riscv64/ubuntu`](https://hub.docker.com/r/riscv64/ubuntu) image can be used -to buiild or run `riscv64gc-unknown-linux-gnu` binaries. +to build or run `riscv64gc-unknown-linux-gnu` binaries. ```bash docker run --platform linux/riscv64 -ti --rm --mount "type=bind,src=$(pwd),dst=/checkout" riscv64/ubuntu bash diff --git a/src/doc/rustc/src/platform-support/x86_64-unknown-linux-none.md b/src/doc/rustc/src/platform-support/x86_64-unknown-linux-none.md index 5608b5cb778..965d6aea931 100644 --- a/src/doc/rustc/src/platform-support/x86_64-unknown-linux-none.md +++ b/src/doc/rustc/src/platform-support/x86_64-unknown-linux-none.md @@ -14,6 +14,11 @@ This target is cross compiled and can be built from any host. This target has no support for host tools, std, or alloc. +One of the primary motivations of the target is to write a dynamic linker and libc in Rust. +For that, the target defaults to position-independent code and position-independent executables (PIE) by default. +PIE binaries need relocation at runtime. This is usually done by the dynamic linker or libc. +You can use `-Crelocation-model=static` to create a position-dependent binary that does not need relocation at runtime. + ## Building the target The target can be built by enabling it for a `rustc` build: diff --git a/src/doc/rustc/src/targets/custom.md b/src/doc/rustc/src/targets/custom.md index a332d24c9f1..6c1494186a4 100644 --- a/src/doc/rustc/src/targets/custom.md +++ b/src/doc/rustc/src/targets/custom.md @@ -21,10 +21,10 @@ To use a custom target, see the (unstable) [`build-std` feature](../../cargo/ref When `rustc` is given an option `--target=TARGET` (where `TARGET` is any string), it uses the following logic: 1. if `TARGET` is the name of a built-in target, use that 2. if `TARGET` is a path to a file, read that file as a json target -3. otherwise, search the colon-seperated list of directories found +3. otherwise, search the colon-separated list of directories found in the `RUST_TARGET_PATH` environment variable from left to right for a file named `TARGET.json`. -These steps are tried in order, so if there are multple potentially valid +These steps are tried in order, so if there are multiple potentially valid interpretations for a target, whichever is found first will take priority. If none of these methods find a target, an error is thrown. diff --git a/src/doc/rustdoc/src/write-documentation/documentation-tests.md b/src/doc/rustdoc/src/write-documentation/documentation-tests.md index e02c26bd42b..b921f677857 100644 --- a/src/doc/rustdoc/src/write-documentation/documentation-tests.md +++ b/src/doc/rustdoc/src/write-documentation/documentation-tests.md @@ -412,7 +412,7 @@ In some cases, doctests cannot be merged. For example, if you have: ``` The problem with this code is that, if you change any other doctests, it'll likely break when -runing `rustdoc --test`, making it tricky to maintain. +running `rustdoc --test`, making it tricky to maintain. This is where the `standalone_crate` attribute comes in: it tells `rustdoc` that a doctest should not be merged with the others. So the previous code should use it: |
