-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undefined reference to 'rust_begin_unwind': {start,end}-group missing when using an allocator #51647
Comments
This was referenced Jun 20, 2018
This may be related to, or even directly caused by, #51671. If I move the |
I can no longer reproduce this. |
paoloteti
added a commit
to paoloteti/compiler-builtins
that referenced
this issue
Sep 1, 2018
rust-lang/rust#51647 has been fixed, so We can remove this hack
paoloteti
added a commit
to paoloteti/compiler-builtins
that referenced
this issue
Sep 1, 2018
rust-lang/rust#51647 has been fixed, so We can remove this hack
paoloteti
added a commit
to paoloteti/compiler-builtins
that referenced
this issue
Sep 1, 2018
rust-lang/rust#51647 has been fixed, so We can remove this hack
AaronKutch
added a commit
to AaronKutch/compiler-builtins
that referenced
this issue
Dec 11, 2020
rust-lang/rust#51647 was fixed
AaronKutch
added a commit
to AaronKutch/compiler-builtins
that referenced
this issue
Dec 11, 2020
rust-lang/rust#51647 is fixed but panic-handler is still needed
AaronKutch
added a commit
to AaronKutch/compiler-builtins
that referenced
this issue
Apr 2, 2021
rust-lang/rust#51647 is fixed but panic-handler is still needed
dmakarov
pushed a commit
to anza-xyz/compiler-builtins
that referenced
this issue
Apr 4, 2021
rust-lang/rust#51647 is fixed but panic-handler is still needed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
STR
AFAICT the issue is that the linker call in the allocator example doesn't include the -Wl,--{start,end}-group flags added in #49316. Linker invocation for each example is shown below:
$ cargo build --example allocator --target thumbv7m-none-eabi
"arm-none-eabi-gcc"
"-L"
"/home/japaric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7m-none-eabi/lib"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.12o6z8zowpxdwec2.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.16u6js6g0l3k1ic6.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.181cuta0v63atwcm.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.1im38lueib99jsk0.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.1mvmz58owquyropc.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.1y16o1qfye96o7m0.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.2lyh15q6cjwzy18c.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.2njzq1xnlu88l3yx.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.2oafmlh5ijbov6fd.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.3ayaeypdcro9d6yk.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.3l0398fjltevyo2h.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.48721dc4k5qxei0u.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.49a7n47po4ttqjl7.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.4ezmh1vbs95c5ack.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.4kcm5l1y0r3i2da7.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.4xq48u46a1pwiqn7.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.4yh8x2b62dcih00t.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.51s1w397y42gpez1.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.56dly8q07ws8ucdq.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.8xzrsc1ux72v29j.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.9elsx31vb4it187.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.9fcb3syd3ne5k0n.rcgu.o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.y08g5q2x813c4wx.rcgu.o"
"-o"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/examples/allocator-d041c1c8fc06f1f7.crate.allocator.rcgu.o"
"-Wl,--gc-sections"
"-nodefaultlibs"
"-L"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/deps"
"-L"
"/home/japaric/tmp/cortex-m-quickstart/target/debug/deps"
"-L"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/build/cortex-m-quickstart-83c2769bb84a5327/out"
"-L"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/build/cortex-m-91d6bcd8221521d0/out"
"-L"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/build/cortex-m-rt-8f472c01bb62b44f/out"
"-L"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/build/cortex-m-rt-8f472c01bb62b44f/out"
"-L"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/build/cortex-m-semihosting-0b565ca91223cdc9/out"
"-L"
"/home/japaric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7m-none-eabi/lib"
"-Wl,-Bstatic"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/deps/libpanic_semihosting-5bedc9c7e9038e5a.rlib"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/deps/libcortex_m_semihosting-2b99179dc7319028.rlib"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/deps/libcortex_m_rt-df2a73939030a238.rlib"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/deps/libr0-0230fc14e4aa7a0c.rlib"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/deps/libcortex_m-608790ed92cdaba8.rlib"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/deps/libvolatile_register-febb9ecda2e1e875.rlib"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/deps/libvcell-5f0330b175b9171f.rlib"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/deps/libbare_metal-cd38b616da4ad7a9.rlib"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/deps/libaligned-65d7a0374e7cc15f.rlib"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/deps/liballoc_cortex_m-1dc8f624614f3e20.rlib"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/deps/liblinked_list_allocator-89856fc389dfa7e0.rlib"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/deps/libcortex_m-d4954d2588102c99.rlib"
"/home/japaric/tmp/cortex-m-quickstart/target/thumbv7m-none-eabi/debug/deps/libvolatile_register-7f8b6601fedcc83f.rlib"
"/home/japaric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7m-none-eabi/lib/liballoc-0cbd0a7c85435046.rlib"
"/home/japaric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7m-none-eabi/lib/libcore-c8a4409079a3a8cf.rlib"
"/home/japaric/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/thumbv7m-none-eabi/lib/libcompiler_builtins-a0b503090929f0e3.rlib"
"-Wl,-Tlink.x"
"-nostartfiles"
"-Wl,-Bdynamic"
Adding
-Wl,--{start,end}-group
to the linker invocation for the allocator example fixes the linking error.I believe this error started showing up after #50144 landed.
Meta
cc @alexcrichton @sfackler
The text was updated successfully, but these errors were encountered: