2013-09-23 12:24:15 +08:00
|
|
|
RUN: lld -flavor gnu -target hexagon --output-filetype=yaml %p/Inputs/quickdata-test.elf-hexagon \
|
2013-08-31 13:27:38 +08:00
|
|
|
RUN: --noinhibit-exec | FileCheck %s -check-prefix hexagon
|
2013-02-23 01:18:53 +08:00
|
|
|
|
2013-08-09 06:26:50 +08:00
|
|
|
hexagon: - name: ac1
|
|
|
|
hexagon: scope: global
|
|
|
|
hexagon: type: zero-fill-quick
|
|
|
|
hexagon: size: 1
|
|
|
|
hexagon: merge: as-tentative
|
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 10:05:01 +08:00
|
|
|
hexagon: - name: init
|
|
|
|
hexagon: scope: global
|
|
|
|
hexagon: type: quick-data
|
2013-10-04 03:25:34 +08:00
|
|
|
hexagon: - name: bss1
|
|
|
|
hexagon: scope: global
|
|
|
|
hexagon: type: zero-fill-quick
|
|
|
|
|