Commit e5212e6
committed
Change
Currently, `aarch64-unknown-none` generates static position *dependent*
binaries which must be loaded at a fixed address in memory. The
[openVMM](https://github.com/microsoft/openvmm) project uses the
`*-unknown-none` targets for an embedded-like environment but needs the
binary to be loadable to any memory address. Currently, the
`x86_64-unknown-none` target is configured to allow this by default but
the `aarch64-unknown-none` target is not.
This commit changes the defaults for the `aarch64-unknown-none` target
to enable static-PIE binaries which aligns the target more closely with
the corresponding `x86_64-unknown-none` target. If users prefer the
prior behavior, they can request that via `-Crelocation-model=static`.aarch64-unknown-none to generate static-PIE binaries by default1 parent 83e49b7 commit e5212e6
File tree
3 files changed
+8
-6
lines changed- compiler/rustc_target/src/spec/targets
- tests/codegen-llvm
3 files changed
+8
-6
lines changedLines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
26 | 25 | | |
| 26 | + | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
0 commit comments