This changes adds a new synthetic section CopyRelSection to hold the ZI reserved for the result of the copy relocation, moreover the dynamic copy relocation is made relative to the CopyRelSection. Previously we altered the size of the OutputSection and made the copy relocation relative to an offset into the OutputSection. This change has a couple of small benefits:
- All dynamic relocations are now relative to an InputSection, this means we can remove the support for OutputSection relative dynamic relocations, which makes us more robust to changes in section offsets after scanRelocs().
- If assignOffsets() is called on .bss or .bss.rel.ro the offsets and final size of the OutputSection will be correct. Previously the work of scanRelocs() would be destroyed by assignOffsets().