Skip to content

Incompatible object file with sparc output #12

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

Closed
andreadimax opened this issue Apr 22, 2025 · 5 comments
Closed

Incompatible object file with sparc output #12

andreadimax opened this issue Apr 22, 2025 · 5 comments

Comments

@andreadimax
Copy link

Hi!

Trying to compile your identical Rust file with the options for sparc-unknown-none-elf in the TOML file you specified resulted me in a linker error:

C:\Software\sparc-bcc-2.3.1-llvm\bin\sparc-gaisler-elf-ld: unknown architecture of input file C:\Users\andrea\AppData\Local\Temp\rustcWVygff\symbols.o' is incompatible with sparc output

As you can see I use bcc-2.3.1-llvm from gaisler and rustc 1.83.0-nightly

Can you help me?

@jonathanpallant
Copy link
Member

Do you see the same issue with the latest nightly?

@andreadimax
Copy link
Author

Unfortunately I can't use the latest :(

@jonathanpallant
Copy link
Member

Unfortunately I can't triage issues in a Tier 3 target that isn't the latest nightly. There were a bunch of known issues with the SPARC target a while back but I think we got them fixed. As far as I know RTEMS still runs a canary build and it's still working.

Ferrous Systems can offer professional support for this target if required. You can reach out via https://ferrous-systems.com/contact/.

@andreadimax
Copy link
Author

andreadimax commented Apr 22, 2025

I solved adding the option "-Wl,--accept-unknown-input-arch" for the linker. Happy to share with you that I succesfully run Rust on TSIM LEON4 emulator! Thank you!

@jonathanpallant
Copy link
Member

Unfortunately that doesn't actually fix rust-lang/rust#130172. You're just including the wrong machine code into your final binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants