Skip to content

Commit 51ea67e

Browse files
author
Sven Van Asbroeck
committed
rust/arm 32-bit: Add target.json
This is simply based on output from: $ rustc +nightly -Z unstable-options \ --target=arm-unknown-linux-gnueabi \ --print target-spec-json Changes made: - removed "unsupported-abis" (does not build) - added "function-sections": false (all kernel functions should go in the .text section) - added "relocation-model": "static" (kernel does not support .data.rel.ro sections) Note that the vanilla `arm-unknown-linux-gnueabi` triple lets rustc generate the armv6 instruction set. Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
1 parent e34bcb9 commit 51ea67e

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

arch/arm/rust/target.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"arch": "arm",
3+
"crt-static-respected": true,
4+
"data-layout": "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64",
5+
"dynamic-linking": true,
6+
"env": "gnu",
7+
"executables": true,
8+
"features": "+strict-align,+v6",
9+
"function-sections": false,
10+
"has-elf-tls": true,
11+
"has-rpath": true,
12+
"is-builtin": true,
13+
"linker-is-gnu": true,
14+
"llvm-target": "arm-unknown-linux-gnueabi",
15+
"max-atomic-width": 64,
16+
"os": "linux",
17+
"position-independent-executables": true,
18+
"pre-link-args": {
19+
"gcc": [
20+
"-Wl,--as-needed",
21+
"-Wl,-z,noexecstack"
22+
]
23+
},
24+
"relocation-model": "static",
25+
"target-family": "unix",
26+
"target-mcount": "\u0001__gnu_mcount_nc",
27+
"target-pointer-width": "32"
28+
}

0 commit comments

Comments
 (0)