This is an alternate fix for the test case from https://reviews.llvm.org/D76114.
The (rather fundamental) issue revealed by this test case is that our relaxation implementation was not correctly adjusting the size and offsets of fragments in one section based on changes in size of another if the layout order of the two happened to be such that the former was visited before the later. To trigger this, you need one section which refers to labels in another, but the fragments involved aren't relaxable. (If they were, that would trigger invalidation.) Any of fill, align, or the like can trip this.
An alternate approach would be to make all fragments with expression computable sizes relaxable. This would require either a) storing the size in the fragment, or b) peaking ahead to compute the previously computed size from the offset of the next fragment.
I'm curious, which do folks think is less ugly?
p.s. This is mostly posted for discussion purposes. Jain, you're welcome to take any of this code and incorporate into a refresh on the original review if desired.