dtolnay/linkme

Cortex-M builds is failing with link error: section overlaps with .rodata

dtolnay opened this issue · 1 comments

https://travis-ci.com/dtolnay/linkme/jobs/263379561

error: linking with `rust-lld` failed: exit code: 1
  |
  = note: "rust-lld" "rust-lld" "-flavor" "gnu" "-L" "/home/travis/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7m-none-eabi/lib" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/cortex_m_linkme_test-e6719463d731e9f0.cortex_m_linkme_test.dqximbec-cgu.0.rcgu.o" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/cortex_m_linkme_test-e6719463d731e9f0.cortex_m_linkme_test.dqximbec-cgu.1.rcgu.o" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/cortex_m_linkme_test-e6719463d731e9f0.cortex_m_linkme_test.dqximbec-cgu.2.rcgu.o" "-o" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/cortex_m_linkme_test-e6719463d731e9f0" "--gc-sections" "-L" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps" "-L" "/home/travis/build/dtolnay/linkme/target/release/deps" "-L" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/build/cortex-m-linkme-test-200ea53de4bd4e09/out" "-L" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/build/cortex-m-31349c7505c00923/out" "-L" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/build/cortex-m-rt-4c8df37bd6f5b5e1/out" "-L" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/build/cortex-m-semihosting-2445422be57c0b84/out" "-L" "/home/travis/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7m-none-eabi/lib" "-Bstatic" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/liblinkme-cf1aa9b254dec488.rlib" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/libcortex_m_rt-4e1c1e14bbef8ced.rlib" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/libr0-1f53d375f373e972.rlib" "--start-group" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/libpanic_semihosting-458c7d50d4f6de89.rlib" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/libcortex_m_semihosting-8944461358d63d4a.rlib" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/libcortex_m-7f4503edc7f5e4d5.rlib" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/libvolatile_register-255db70b159ec0a4.rlib" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/libvcell-b3554e83a40b7ef5.rlib" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/libbare_metal-1297e03344968a12.rlib" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/libaligned-7926c2ef4e454092.rlib" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/libas_slice-7ff6256bbd72fde4.rlib" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/libstable_deref_trait-550b77b954e6d921.rlib" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/libgeneric_array-685219a2762e8d8f.rlib" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/libgeneric_array-5204fbf5f82b726a.rlib" "/home/travis/build/dtolnay/linkme/target/thumbv7m-none-eabi/release/deps/libtypenum-94476904ccd9d85f.rlib" "/home/travis/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7m-none-eabi/lib/librustc_std_workspace_core-eafb71f8805df5a7.rlib" "/home/travis/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7m-none-eabi/lib/libcore-bfb368382075f384.rlib" "--end-group" "/home/travis/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7m-none-eabi/lib/libcompiler_builtins-c6415c30ba62782a.rlib" "-Tlink.x" "-Bdynamic"
  = note: rust-lld: error: section linkme_SHENANIGANS file range overlaps with .rodata
          >>> linkme_SHENANIGANS range is [0x2604, 0x260F]
          >>> .rodata range is [0x2604, 0x29BF]
          
          rust-lld: error: section linkme_SHENANIGANS virtual address range overlaps with .rodata
          >>> linkme_SHENANIGANS range is [0x1604, 0x160F]
          >>> .rodata range is [0x1604, 0x19BF]
          
          rust-lld: error: section linkme_SHENANIGANS load address range overlaps with .rodata
          >>> linkme_SHENANIGANS range is [0x1604, 0x160F]
          >>> .rodata range is [0x1604, 0x19BF]