Open Quuxplusone opened 3 years ago
Actually, watchOS uses arm64_32...
Correction: Older Watch devices still use arm32, so we do want to support this.
De-prioritizing for now, we have decided to focus on other platforms first
@smeenai suggested that I document some of the potential issues with arm32 for whomever wants to try to add support, so here goes:
For branch targets with addends on arm32, llvm-mc will encode them using scattered relocations, which refer to their target using raw offsets (scattered relocs have no symbol number). However, we need to know what symbol the branch is pointing to, because the THUMB_DEF bit is stored on the symbol. Right now LLD only supports address -> subsection mappings, not address -> symbol. We can certainly add support for it, it's just a bunch more bookkeeping information, but it definitely feels a bit awkward, especially since we don't know whether our address offset has a a corresponding symbol, or if it's pointing into a section that has no symbols. (Maybe branch relocs will never target a section without symbols?)
In particular, watchOS uses it