Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • R rust-card10
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Astro
  • rust-card10
  • Issues
  • #13
Closed
Open
Issue created Sep 10, 2019 by rnd@rndContributor

`LTO` currently hides relocation errors in libcore

What Happened

I just setup a new l0dable-crate and followed the instructions inside the README file which does not work as they do not mention that its necessary to enable the lto for the release profile. To verify this I double checked this with the example inside this repository and as soon as the lto is disabled the compilation process fails with a bunch of error messages like the one below.

Errors like these:
  = note: "arm-none-eabi-gcc" "-L" "/home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib" "/home/rnd/dev/card10/rust-card10/target/thumbv7em-none-eabi/release/deps/example-b0d06d53a9f29c5f.example.7u538awy-cgu.0.rcgu.o" "-o" "/home/rnd/dev/card10/rust-card10/target/thumbv7em-none-eabi/release/deps/example-b0d06d53a9f29c5f" "/home/rnd/dev/card10/rust-card10/target/thumbv7em-none-eabi/release/deps/example-b0d06d53a9f29c5f.nft3kh2apwplqaf.rcgu.o" "-Wl,--gc-sections" "-nodefaultlibs" "-L" "/home/rnd/dev/card10/rust-card10/target/thumbv7em-none-eabi/release/deps" "-L" "/home/rnd/dev/card10/rust-card10/target/release/deps" "-L" "/home/rnd/dev/card10/rust-card10/target/thumbv7em-none-eabi/release/build/card10-sys-d11570dd222738cc/out" "-L" "/home/rnd/dev/card10/rust-card10/target/thumbv7em-none-eabi/release/build/card10-sys-d11570dd222738cc/out" "-L" "/home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib" "-Wl,--start-group" "-Wl,-Bstatic" "/home/rnd/dev/card10/rust-card10/target/thumbv7em-none-eabi/release/deps/libcard10_alloc-0254c29aaf5bda3c.rlib" "/home/rnd/dev/card10/rust-card10/target/thumbv7em-none-eabi/release/deps/liballoc_cortex_m-0da8bc6a774b2859.rlib" "/home/rnd/dev/card10/rust-card10/target/thumbv7em-none-eabi/release/deps/liblinked_list_allocator-02d8a1d1def89043.rlib" "/home/rnd/dev/card10/rust-card10/target/thumbv7em-none-eabi/release/deps/libcortex_m-de4b518b8429cfa0.rlib" "/home/rnd/dev/card10/rust-card10/target/thumbv7em-none-eabi/release/deps/libvolatile_register-2bcbe72d87a3d2d7.rlib" "/home/rnd/dev/card10/rust-card10/target/thumbv7em-none-eabi/release/deps/libcard10_l0dable-431ac302d8891658.rlib" "/home/rnd/dev/card10/rust-card10/target/thumbv7em-none-eabi/release/deps/libembedded_graphics-3018aaf3934f4f68.rlib" "/home/rnd/dev/card10/rust-card10/target/thumbv7em-none-eabi/release/deps/libcard10_sys-675eb94201fb2a83.rlib" "/home/rnd/dev/card10/rust-card10/target/thumbv7em-none-eabi/release/deps/libr0-c42ab1499cb9a0ec.rlib" "/home/rnd/dev/card10/rust-card10/target/thumbv7em-none-eabi/release/deps/libpanic_abort-af6456563b344557.rlib" "/home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/liballoc-e72836af3c963598.rlib" "/home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/librustc_std_workspace_core-892a1fc9f1778e64.rlib" "/home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib" "-Wl,--end-group" "/home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcompiler_builtins-3566d98813543234.rlib" "-Tl0dable.ld" "-n" "-pie" "-fPIC" "-Wl,-Bdynamic"
  = note: /usr/lib/gcc/arm-none-eabi/7.3.1/../../../arm-none-eabi/bin/ld: /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/liballoc-e72836af3c963598.rlib(alloc-e72836af3c963598.alloc.6vtnwfkv-cgu.0.rcgu.o): relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
          /usr/lib/gcc/arm-none-eabi/7.3.1/../../../arm-none-eabi/bin/ld: /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o): relocation R_ARM_THM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/liballoc-e72836af3c963598.rlib(alloc-e72836af3c963598.alloc.6vtnwfkv-cgu.0.rcgu.o):(.rodata..Lanon.0b0626764e5e7f05a26647479b1fe19f.1+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/liballoc-e72836af3c963598.rlib(alloc-e72836af3c963598.alloc.6vtnwfkv-cgu.0.rcgu.o):(.rodata..Lanon.0b0626764e5e7f05a26647479b1fe19f.1+0xc): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/liballoc-e72836af3c963598.rlib(alloc-e72836af3c963598.alloc.6vtnwfkv-cgu.0.rcgu.o):(.rodata..Lanon.0b0626764e5e7f05a26647479b1fe19f.1+0x10): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/liballoc-e72836af3c963598.rlib(alloc-e72836af3c963598.alloc.6vtnwfkv-cgu.0.rcgu.o):(.rodata..Lanon.0b0626764e5e7f05a26647479b1fe19f.1+0x14): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/liballoc-e72836af3c963598.rlib(alloc-e72836af3c963598.alloc.6vtnwfkv-cgu.0.rcgu.o):(.rodata..Lanon.0b0626764e5e7f05a26647479b1fe19f.3+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/liballoc-e72836af3c963598.rlib(alloc-e72836af3c963598.alloc.6vtnwfkv-cgu.0.rcgu.o):(.rodata..Lanon.0b0626764e5e7f05a26647479b1fe19f.5+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/liballoc-e72836af3c963598.rlib(alloc-e72836af3c963598.alloc.6vtnwfkv-cgu.0.rcgu.o):(.rodata..Lanon.0b0626764e5e7f05a26647479b1fe19f.5+0xc): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/liballoc-e72836af3c963598.rlib(alloc-e72836af3c963598.alloc.6vtnwfkv-cgu.0.rcgu.o):(.rodata..Lanon.0b0626764e5e7f05a26647479b1fe19f.10+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/liballoc-e72836af3c963598.rlib(alloc-e72836af3c963598.alloc.6vtnwfkv-cgu.0.rcgu.o):(.rodata..Lanon.0b0626764e5e7f05a26647479b1fe19f.10+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.2+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.2+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.4+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.4+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.6+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.6+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.8+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.8+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.10+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.10+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.12+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.12+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.13+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.14+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.15+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.15+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.16+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.16+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.17+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.17+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.18+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.18+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.19+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.19+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.20+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.23+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.24+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.26+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.26+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.27+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.27+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.28+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.28+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.29+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.29+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.30+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.30+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.31+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.31+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.33+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.33+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.37+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.37+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.37+0x10): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.38+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.38+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.39+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.40+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.42+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.42+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.44+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.44+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.45+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.45+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.46+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.46+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.47+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.48+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.49+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.50+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.51+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.52+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.54+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.54+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.56+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.56+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.88+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.88+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.112+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.112+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.113+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.125+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.139+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.139+0xc): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.148+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.148+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.166+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.166+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.170+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.170+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.173+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.180+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.180+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.181+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.184+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.184+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.185+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.232+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.232+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.232+0x10): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.233+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.237+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.237+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.237+0x10): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.237+0x18): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.238+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.242+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.242+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.242+0x10): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.242+0x18): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.242+0x20): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.243+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.249+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.249+0xc): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.249+0x10): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.249+0x14): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.274+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.274+0xc): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.274+0x10): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.274+0x14): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.275+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.276+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.298+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.299+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.300+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.301+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.302+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.331+0x100): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.331+0x108): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.331+0x110): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.410+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.413+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.413+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.414+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.416+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.416+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.417+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.418+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.419+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.420+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.421+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.422+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.423+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.424+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.426+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.426+0x8): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.444+0x0): dangerous relocation: unsupported relocation
          /home/rnd/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7em-none-eabi/lib/libcore-dfc29ee16632c3f1.rlib(core-dfc29ee16632c3f1.core.degj9ma7-cgu.0.rcgu.o):(.rodata..Lanon.b8789e1f22b96bef6f1f45c47065e9d4.444+0xc): dangerous relocation: unsupported relocation
          collect2: error: ld returned 1 exit status

Issue

One of these many lines of output mentions that the reason might be that libcore is not compiled with -fPIC as linker argument which could be true as libcore, liballoc and libstd are normally precompiled for all targets managed by rustc. So even if we use -fPIC inside our custom linker flags this won't apply to libcore.

Sot the only reason that we were able to compile until know was that the related instructions are not present in all parts of libcore and we don not accidentilly encountered one of the bad ones so that the lto was still able to remove them all. This might change in the future or for any dependent project which tries to use other parts of libcore.

Proposed Solution

The solution might be simpler than it seems as the project cargo-xbuild (previsouly known as xargo) exists to fix exactly this kind of issue. It can be used to create project and target specific versions of libcore, liballoc and libstd on the fly as it will just recompile them with the given compiler and linker flags during the build process.

(This should also reduce the executable size a bit further as we are still able to use lto which should work even better than before in this new scenario.)

Required Changes

Almost none. The compilaton will require cargo-xbuild, the nightly toolchain, the thumbv7em-eabi-none target and the related rust-src component. None of these would affect the the source code itself. The updated setup instructions would look like:

rustup toolchain install nightly
rustup target add thumbv7em-none-eabi --toolchain nightly
rustup component add rust-src --target thumbv7em-none-eabi --toolchain nightly
cargo install cargo-xbuild

To build the project it would now be necessary to call xbuild instead of build:

carg +nightly xbuild --target thumbv7em-none-eabi --release

If the target is still defined inside .cargo/config its not even necessary to mention it inside the call.

We are also going to encounter https://github.com/japaric/xargo/issues/45 which will require that we split the definition of linker-args in .cargo/config into multiple calls of link-arg.

[target.thumbv7em-none-eabi]
rustflags = [
  "-C", "linker=arm-none-eabi-gcc",
  "-C", "link-arg=-Tl0dable.ld",
  "-C", "link-arg=-n",
  "-C", "link-arg=-pie",
  "-C", "link-arg=-fPIC",
  "-C", "relocation-model=pic",
]
Edited Sep 10, 2019 by rnd
Assignee
Assign to
Time tracking