Our current logic assumes we place synthetic sections
after all regular ones. I lost some time during writing another patch
because placed some code that added sections before code
that adds common section. That broke logic of removeUnusedSyntheticSections
for me.
There are few possible ways to avoid that.
One of them would be to remove dependency on such logic from
removeUnusedSyntheticSections().
The second is this patch, which introduces an assert check to ensure
that does not happen.