[ELF] Special case --shuffle-sections=-1 to reverse input sections
If the number of sections changes, which is common for re-links after incremental updates, the section order may change drastically. Special case -1 to reverse input sections. This is a stable transform. The section order is more resilient to incremental updates. Usually the code issue (e.g. Static Initialization Order Fiasco, assuming pointer comparison result of two unrelated objects) is due to the relative order between two problematic input files A and B. Checking the regular order and the reversed order is sufficient. Differential Revision: https://reviews.llvm.org/D98445
Loading
Please sign in to comment