The new value is taken from <mach/machine.h> in the MacOSX10.14 SDK from
Xcode 10.1. Update llvm-objdump and llvm-readobj accordingly.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Shouldn't there be an accompanying change to readobj to display the values for the object files?
I agree, simply updating the enum by itself doesn't accomplish much. Is there something specific driving this change?
EDIT: I mean, is there something specific driving the change other than simply updating to match the macOS 10.14 SDK?
I was planning on doing the objdump change as a follow-up, but you're right that this change doesn't really accomplish anything as-is :) I'll fold the objdump change into this patch.
Of the code additions in this change, I'm only adding a test for one block, because that was the only block I could find related tests for. I'm happy to add tests for the other code blocks for my specific changes, but I don't have the bandwidth to improve the general coverage for them right now.
Note that Apple's objdump (from Xcode 10.1) does print a symbolic subtype for arm64e but not for arm64_v8 (it just prints the numeric subtype there). I don't know if arm64_v8 is actually used for anything right now, and I'm happy to limit this change to just arm64e if Apple prefers.
There's one other block that references CPU_SUBTYPE_ARM64_ALL that I haven't updated, because I don't know what the appropriate values for the new subtypes should be: https://github.com/llvm/llvm-project/blob/95bb3c3cc3f74d2448e6a495c6989f988c24770c/llvm/lib/Object/MachOObjectFile.cpp#L2628
Hmm, if I may: what do you want to support? I'd expect Apple to upstream their own patches.
I'm hoping we can get Ahmed to comment on this review, since this may conflict with the changes he is trying to land.
I'm playing around with ld64, which requires TAPI for reading tbd files. The existing open source release of TAPI doesn't support arm64e, so it chokes on tbd files from Xcode 10. Adding the CPU_SUBTYPE_ARM64E constant to LLVM allows adding basic arm64e support to TAPI.
From this conversation, it sounds like the arm64e bits might be getting upstreamed soon, which is exciting. I don't know what the timeline on that is like though, and this seems like a small piece that should be pretty similar (if not identical) to what you have internally, so I was hoping it would be okay to land it independently.
@ab, @mtrent – this is a small patch, and I can keep it locally if need be, especially if all the arm64e work will be upstreamed soon. With that said, I'd really appreciate any input on whether this is okay or not from the perspective of conflicting with Apple's planned arm64e upstreaming, and what the timeline on that upstreaming might look like. Also CC'ing @ributzka, since TAPI was my motivation for adding this.