-
Notifications
You must be signed in to change notification settings - Fork 213
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
Multiple definition of '__aeabi_uidivmod' and '__aeabi_uldivmod' on arm-linux-androideabi #412
Comments
This should result in every function getting built in a separate object file, but it doesn't seem to be happening here for some reason: the linker error shows that both |
The functions are not placed in their own module. Rustc starts codegen unit partitioning with modules, not individual functions. The compiler-builtins/src/macros.rs Lines 266 to 272 in e6fd1b2
|
I am encountering this same issue trying to build a Zephyr application in Rust. I was able to workaround it by changing the Zephyr build system to place |
Hopefully this should be fixed by #452 which will be included in rust-lang/rust#93696. Please try it in the next nightly once that is merged. |
This issue was fixed, and |
In rust-lang/rust#83822 I attempted to remove the
--allow-multiple-definition
linker hack from Android target specs in rustc, but observed the next linking error:Previously
compiler-builtins
fixed similar errors on other targets by putting symbols to separate object files or changing linking order.It would be great to fix this case as well, and remove
--allow-multiple-definition
from Android target specs.That option is a really heavy hammer used when everything is on fire but you still need to make things work, and it is able to hide legitimate errors.
The text was updated successfully, but these errors were encountered: