I've implemented support for v4T (GBA) and v6K (3DS) and tested with agbcc and armcc. Both compilers emit the .ARM.attributes section, which makes it possible to auto-detect the ARM version being used. Parsing the section was more complicated than I was hoping, so I developed a new crate called arm-attr to do the magic for us.
Since mwcc (DS compiler) doesn't emit the attributes section, the ARM version falls back to v5TE when no version info is found. If needed, there's a dropdown in "Arch Settings" to override any auto-detection.
agbcc sets the LSB for Thumb symbols, which meant that all Thumb code was shifted over by one byte and got displayed wrong. To solve this, I've added ObjArch::symbol_address which is called when resolving symbols, and ObjArchArm overrides the default behavior by clearing the LSB.
I've implemented support for v4T (GBA) and v6K (3DS) and tested with
agbcc
andarmcc
. Both compilers emit the .ARM.attributes section, which makes it possible to auto-detect the ARM version being used. Parsing the section was more complicated than I was hoping, so I developed a new crate calledarm-attr
to do the magic for us.Since
mwcc
(DS compiler) doesn't emit the attributes section, the ARM version falls back to v5TE when no version info is found. If needed, there's a dropdown in "Arch Settings" to override any auto-detection.agbcc
sets the LSB for Thumb symbols, which meant that all Thumb code was shifted over by one byte and got displayed wrong. To solve this, I've addedObjArch::symbol_address
which is called when resolving symbols, andObjArchArm
overrides the default behavior by clearing the LSB.