This is not a review request, just using Phabricator to hold a diff I can point to from [llvm-dev]
The patch is all the changes I've made for a first draft of changing createThunks() to insert into InputSectionDescriptions. This isn't optimized or refactored for readability.
The most important things to note are:
- To insert into InputSectionDescriptions we need to fabricate InputSectionDescriptions for orphan sections.
- The .ARM.exidx sort by link order can be broken by the linker script sorting as well as Thunks. I've put a fix in for that as well