The function call that goes through PLT table may be performed from both ARM and Thumb code. This situation requires adding a veneer to original PLT code (which is always ARM) to effect Thumb-to-ARM transition.
Details
Diff Detail
Event Timeline
lib/ReaderWriter/ELF/ARM/ARMRelocationPass.cpp | ||
---|---|---|
296–308 | When the same atom is called through PLT from both ARM and Thumb, it's enough to generate one PLT with transition code on top of it. ARM code will reference ARM instructions while Thumb code will first execute instruction mode switch. Obviously, I first implemented separate PLTs for ARM & Thumb, but then saw how gcc handles it in one PLT entry and decided that it's more optimal. | |
555–556 | When the same atom is called from both modes, the one mode will call the code directly as mode switch is not needed, and the other will use the veneer generated. The conditions for veneer generation are checked in handleVeneer method, while this method only creates a veneer when requested. |
We usually put protected members after public members. You may want to move this for consistency.