Skip to content

Commit b235cc9

Browse files
committed
Document x86_64-unknown-linux-none is PIE by default
1 parent e5bf8b0 commit b235cc9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/doc/rustc/src/platform-support/x86_64-unknown-linux-none.md

+5
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ This target is cross compiled and can be built from any host.
1414

1515
This target has no support for host tools, std, or alloc.
1616

17+
One of the primary motivations of the target is to write a dynamic linker and libc in Rust.
18+
For that, the target defaults to position-independent code and position-independent executables (PIE) by default.
19+
PIE binaries need relocation at runtime. This is usually done by the dynamic linker or libc.
20+
You can use `-Crelocation-model=static` to create a position-dependent binary that does not need relocation at runtime.
21+
1722
## Building the target
1823

1924
The target can be built by enabling it for a `rustc` build:

0 commit comments

Comments
 (0)