about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNoratrieb <48135649+Noratrieb@users.noreply.github.com>2024-12-25 16:59:55 +0100
committerNoratrieb <48135649+Noratrieb@users.noreply.github.com>2024-12-29 18:12:34 +0100
commitb235cc9e703c323a3ae01951980c776e916ea34e (patch)
tree84352e066517bcfae17bf87e117fb03f4c2f116b
parente5bf8b0f354ed6108f2c8f1806946112ed80989d (diff)
downloadrust-b235cc9e703c323a3ae01951980c776e916ea34e.tar.gz
rust-b235cc9e703c323a3ae01951980c776e916ea34e.zip
Document x86_64-unknown-linux-none is PIE by default
-rw-r--r--src/doc/rustc/src/platform-support/x86_64-unknown-linux-none.md5
1 files changed, 5 insertions, 0 deletions
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: