diff options
| author | Yuri Astrakhan <YuriAstrakhan@gmail.com> | 2024-07-26 17:33:59 -0400 |
|---|---|---|
| committer | Yuri Astrakhan <YuriAstrakhan@gmail.com> | 2024-08-30 01:19:55 -0400 |
| commit | f41e0bb41d5e038b3bc6fd4b0ba6d03f048df5e4 (patch) | |
| tree | e11ec5c6f49f3f1e32976db0bf03450a70ae0aef /src/doc/rustc | |
| parent | ac77e88f7a84e20311f5518e34c806503d586c1c (diff) | |
| download | rust-f41e0bb41d5e038b3bc6fd4b0ba6d03f048df5e4.tar.gz rust-f41e0bb41d5e038b3bc6fd4b0ba6d03f048df5e4.zip | |
Squashed `aarch64_unknown_nto_qnx700` support
Diffstat (limited to 'src/doc/rustc')
| -rw-r--r-- | src/doc/rustc/src/platform-support.md | 1 | ||||
| -rw-r--r-- | src/doc/rustc/src/platform-support/nto-qnx.md | 18 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index 0d79e5f4114..a2641b22753 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -256,6 +256,7 @@ target | std | host | notes [`aarch64-kmc-solid_asp3`](platform-support/kmc-solid.md) | ✓ | | ARM64 SOLID with TOPPERS/ASP3 [`aarch64-nintendo-switch-freestanding`](platform-support/aarch64-nintendo-switch-freestanding.md) | * | | ARM64 Nintendo Switch, Horizon [`aarch64-unknown-teeos`](platform-support/aarch64-unknown-teeos.md) | ? | | ARM64 TEEOS | +[`aarch64-unknown-nto-qnx700`](platform-support/nto-qnx.md) | ? | | ARM64 QNX Neutrino 7.0 RTOS | [`aarch64-unknown-nto-qnx710`](platform-support/nto-qnx.md) | ✓ | | ARM64 QNX Neutrino 7.1 RTOS | `aarch64-unknown-freebsd` | ✓ | ✓ | ARM64 FreeBSD [`aarch64-unknown-hermit`](platform-support/hermit.md) | ✓ | | ARM64 Hermit diff --git a/src/doc/rustc/src/platform-support/nto-qnx.md b/src/doc/rustc/src/platform-support/nto-qnx.md index 51a397a38d2..1c240d1255a 100644 --- a/src/doc/rustc/src/platform-support/nto-qnx.md +++ b/src/doc/rustc/src/platform-support/nto-qnx.md @@ -24,6 +24,7 @@ Currently, the following QNX Neutrino versions and compilation targets are suppo |----------------------|---------------------|:------------:|:----------------:| | 7.1 | AArch64 | ✓ | ✓ | | 7.1 | x86_64 | ✓ | ✓ | +| 7.0 | AArch64 | ? | ✓ | | 7.0 | x86 | | ✓ | Adding other architectures that are supported by QNX Neutrino is possible. @@ -43,6 +44,23 @@ When linking `no_std` applications, they must link against `libc.so` (see exampl required because applications always link against the `crt` library and `crt` depends on `libc.so`. This is done automatically when using the standard library. +### Disabling RELocation Read-Only (RELRO) + +While not recommended by default, some QNX kernel setups may require the `RELRO` to be disabled with `-C relro_level=off`, e.g. by adding it to the `.cargo/config.toml` file: + +```toml +[target.aarch64-unknown-nto-qnx700] +rustflags = ["-C", "relro_level=off"] +``` + +If your QNX kernel does not allow it, and `relro` is not disabled, running compiled binary would fail with `syntax error: ... unexpected` or similar. This is due to kernel trying to interpret compiled binary with `/bin/sh`, and obviously failing. To verify that this is really the case, run your binary with the `DL_DEBUG=all` env var, and look for this output. If you see it, you should disable `relro` as described above. + +```text +Resolution scope for Executable->/bin/sh: + Executable->/bin/sh + libc.so.4->/usr/lib/ldqnx-64.so.2 +``` + ### Small example application Small `no_std` example is shown below. Applications using the standard library work as well. |
