[LLD][ELF][ARM] recommit Fix ARM Exidx order for non monotonic section order
authorPeter Smith <peter.smith@arm.com>
Fri, 24 Apr 2020 10:23:23 +0000 (11:23 +0100)
committerPeter Smith <peter.smith@arm.com>
Fri, 24 Apr 2020 12:47:28 +0000 (13:47 +0100)
commit3b1622d63a9c2e0a63a5796f94a7f4218a9a4cad
tree9081d33901fae7fadd5866dfa3f56fd5cfc10aa4
parent2da89df4e8d240160d5f265ecac4b0c6a0705d65
[LLD][ELF][ARM] recommit Fix ARM Exidx order for non monotonic section order

Fixed error detected by msan. The size field of the .ARM.exidx synthetic
section needs to be initialized to at least estimation level before
calling assignAddresses as that will use the size field.

This was previously reverted in 1ca16fc4f5146b90512d4740cfcc4d4c34640853.

Differential Revision: https://reviews.llvm.org/D78422
lld/ELF/SyntheticSections.cpp
lld/ELF/SyntheticSections.h
lld/ELF/Writer.cpp
lld/test/ELF/arm-exidx-script-order.s [new file with mode: 0644]