You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
43
44
required because applications always link against the `crt` library and `crt` depends on `libc.so`.
44
45
This is done automatically when using the standard library.
45
46
47
+
### Disabling RELocation Read-Only (RELRO)
48
+
49
+
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:
50
+
51
+
```toml
52
+
[target.aarch64-unknown-nto-qnx700]
53
+
rustflags = ["-C", "relro_level=off"]
54
+
```
55
+
56
+
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.
57
+
58
+
```text
59
+
Resolution scope for Executable->/bin/sh:
60
+
Executable->/bin/sh
61
+
libc.so.4->/usr/lib/ldqnx-64.so.2
62
+
```
63
+
46
64
### Small example application
47
65
48
66
Small `no_std` example is shown below. Applications using the standard library work as well.
0 commit comments