gimli-rs / object

A unified interface for reading and writing object file formats
https://docs.rs/object/
Apache License 2.0
658 stars 149 forks source link

Add Architecture::Sparc #699

Closed philipc closed 3 months ago

philipc commented 3 months ago

Closes #698

glaubitz commented 3 months ago

On Jun 24, 2024, at 8:53 AM, Philip Craig @.***> wrote: @philipc commented on this pull request.

In src/common.rs:

@@ -27,6 +27,7 @@ pub enum Architecture { S390x, Sbf, Sharc,

  • Sparc32,

A search shows that use of "sparc32" is not uncommon, and the term "SPARC" is also used in some 64-bit contexts, so I prefer to use "Sparc32" since it is less ambiguous. The thing is that rustc itself calls it “sparc” and not “sparc32”. It’s analogous to PowerPC where you have “PowerPc” and “PowerPc64”.It’s also the architecture name that GCC and LLVM uses and I think we should match that to avoid confusion.I don’t know any Linux distribution which used the architecture name “sparc32”Yes, I'll accept a PR that adds support for "EM_SPARC32PLUS".Message ID: @.***> OK. I am currently still doing some testing as I ran into some other rustc bugs which to be resolved first.

glaubitz commented 3 months ago

Looks good to me. Also verified to work correctly.

Thanks for adjusting the architecture name as requested.

Could you adjust the title of the pull request to match the new commit message before merging? Thanks!

I will send a follow-up pull request to add EM_SPARC32PLUS unless you beat me to it.