[ELF] Shuffle .init_array/.fini_array with --shuffle-sections=
authorFangrui Song <maskray@google.com>
Thu, 20 Feb 2020 07:14:49 +0000 (23:14 -0800)
committerFangrui Song <maskray@google.com>
Fri, 21 Feb 2020 16:16:07 +0000 (08:16 -0800)
commitdbd7281aa775a0e23c43a02583593900cd4c05be
tree2f0220531142499f6dc747c904e44d3246aa6a63
parentc47e0e2d37d32ec56c760f1a2c9740d69c370b57
[ELF] Shuffle .init_array/.fini_array with --shuffle-sections=

Useful for detecting static initialization order fiasco.

Reviewed By: grimar

Differential Revision: https://reviews.llvm.org/D74887
lld/ELF/Writer.cpp
lld/test/ELF/shuffle-sections-init-fini.s [new file with mode: 0644]