ELF: Use stable sort to sort .{init,fini}_array sections.
authorRui Ueyama <ruiu@google.com>
Wed, 10 Feb 2016 23:26:27 +0000 (23:26 +0000)
committerRui Ueyama <ruiu@google.com>
Wed, 10 Feb 2016 23:26:27 +0000 (23:26 +0000)
commit2625882ebbb3752fb215ec94dc128019c3b381c5
tree8cea893aff9158b36ee974d1a5cd2b56e8e8078f
parentc87d7d02e146b4ce92a8d908a87ade973777e469
ELF: Use stable sort to sort .{init,fini}_array sections.

Global constructors and destructors are guaranteed to be called
in the order as they appear in a translation unit. So we don't want
to mess up the order if they have the same priority.

llvm-svn: 260463
lld/ELF/OutputSections.cpp
lld/test/ELF/init_fini_priority.s