llvm-project/lld/test/elf/AArch64
Rui Ueyama 33ab83bc4b ELF: Don't use LayoutPass.
Previously we applied the LayoutPass to order atoms and then
apply elf::ArrayOrderPass to sort them again. The first pass is
basically supposed to sort atoms in the normal fashion (which
is to sort symbols in the same order as the input files).
The second pass sorts atoms in {init,fini}_array.<priority> by
priority.

The problem is that the LayoutPass is overkill. It analyzes
references between atoms to make a decision how to sort them.
It's slow, hard to understand, and above all, it doesn't seem
that we need its feature for ELF in the first place.

This patch remove the LayoutPass from ELF pass list. Now all
reordering is done in elf::OrderPass. That pass sorts atoms by
{init,fini}_array, and if they are not in the special section,
they are ordered as the same order as they appear in the command
line. The new code is far easier to understand, faster, and
still able to create valid executables.

Unlike the previous layout pass, elf::OrderPass doesn't count
any attributes of an atom (e.g. permissions) except its
position. It's OK because the writer takes care of them if we
have to.

This patch changes the order of final output, although that's
benign. Tests are updated.

http://reviews.llvm.org/D7278

llvm-svn: 227666
2015-01-31 02:05:01 +00:00
..
Inputs
defsym.test ELF: Don't use LayoutPass. 2015-01-31 02:05:01 +00:00
dontignorezerosize-sections.test
dynlib-nointerp-section.test
initfini.test
rel-abs32.test ELF/AArch64: Add a test for R_AARCH64_ABS32 2014-12-11 12:37:35 +00:00
rel-abs64.test ELF/AArch64: Add a test for R_AARCH64_ABS64 2014-12-11 12:36:58 +00:00
rel-bad.test