the "SCN_MEM_16BIT" flag (which indicate that the text sections contain thumb code [1]) is set even if we are compiling non-thumb code.
I couldn't check this as thumb mode seems to be forced in clang/lib/Driver/ToolChain.cpp, function ToolChain::ComputeLLVMTriple. Forcing the ARM mode by default will makes clang/llvm complains that this isn't supported (I didn't dug further).
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Im not sure that this change is really worth it. We do not support Windows ARM at all. The ARM NT is a pure thumb mode execution. I don't think you can even get MSVC to generate code for ARM mode. That said, with the minor tweak to the overly verbose comment, I don't think that this harms anything as we normalize the target triple to thumb anyways and we have a number of other assumptions based on the fact that the triple is set to thumb.
lib/MC/MCObjectFileInfo.cpp | ||
---|---|---|
608 | I think that the comment is a bit verbose. Plus, the comment is better applied to the flag calculation below. I would recommend something like: Set the `IMAGE_SCN_MEM_16BIT` flag when compiling for thumb mode. This is used to indicate to the linker that the text segment contains thumb instructions and to set the ISA selection bit for calls accordingly. |
I think that the comment is a bit verbose. Plus, the comment is better applied to the flag calculation below. I would recommend something like: