[lld] r227666 - ELF: Don't use LayoutPass.
Rafael Auler
rafaelauler at gmail.com
Sat Jan 31 14:01:53 PST 2015
Oddly, this breaks my darwin build compiling with Apple's clang 6.0 (but
not the Linux one with gcc 4.8.2). I'm reporting this here to give you a
heads up because it looks like the buildbots for lld on darwin are red
anyway for another problem (failure do locate Intrinsics.gen).
rafael$ ninja check-lld
[15/15] Running lld test suite
FAILED: cd /Users/rafael/p/obj/tools/lld/test && /usr/bin/python
/Users/rafael/p/llvm/utils/lit/lit.py -sv --param
lld_site_config=/Users/rafael/p/obj/tools/lld/test/lit.site.cfg --param
lld_unit_site_config=/Users/rafael/p/obj/tools/lld/test/Unit/lit.site.cfg
/Users/rafael/p/obj/tools/lld/test
-- Testing: 651 tests, 8 threads --
Testing: 0 .. 10.. 20.. 30.. 40
FAIL: lld :: elf/X86_64/startGroupEndGroup.test (286 of 651)
******************** TEST 'lld :: elf/X86_64/startGroupEndGroup.test'
FAILED ********************
Script:
--
not lld -flavor gnu -target x86_64
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/1.o
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/libfn.a
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/libfn1.a -o x
2>
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.tmp.err
lld -flavor gnu -target x86_64
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/1.o
--start-group
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/libfn.a
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/libfn1.a
--end-group -o
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.tmp1
lld -flavor gnu -target x86_64
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/1.o
--start-group
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/fn.o
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/fn2.o
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/fn1.o
--end-group -o
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.tmp2
lld -flavor gnu -target x86_64
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/1.o
--start-group --whole-archive
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/libfn.a
--no-whole-archive
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/libfn1.a
--end-group -o
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.tmp3
lld -flavor gnu -target x86_64
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/1.o
--start-group
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/libfn2.so
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/fn1.o
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/fn.o
--end-group -o
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.tmp4
lld -flavor gnu -target x86_64
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/1.o '-('
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/libfn.a
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/libfn1.a '-)'
-o
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.tmp1.alias
lld -flavor gnu -target x86_64
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/1.o '-('
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/fn.o
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/fn2.o
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/fn1.o '-)' -o
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.tmp2.alias
lld -flavor gnu -target x86_64
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/1.o '-('
--whole-archive
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/libfn.a
--no-whole-archive
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/libfn1.a '-)'
-o
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.tmp3.alias
llvm-nm
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.tmp1
| FileCheck -check-prefix=RESOLVEDEXTERNAL
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/startGroupEndGroup.test
llvm-nm
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.tmp2
| FileCheck -check-prefix=RESOLVEDEXTERNAL
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/startGroupEndGroup.test
llvm-nm
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.tmp3
| FileCheck -check-prefix=RESOLVEDEXTERNAL
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/startGroupEndGroup.test
llvm-nm
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.tmp1.alias
| FileCheck -check-prefix=RESOLVEDEXTERNAL
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/startGroupEndGroup.test
llvm-nm
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.tmp2.alias
| FileCheck -check-prefix=RESOLVEDEXTERNAL
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/startGroupEndGroup.test
llvm-nm
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.tmp3.alias
| FileCheck -check-prefix=RESOLVEDEXTERNAL
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/startGroupEndGroup.test
--
Exit Code: 132
Command Output (stderr):
--
Assertion failed: (lhs->ordinal() != rhs->ordinal()), function
compareByPosition, file
/Users/rafael/p/llvm/tools/lld/lib/Core/DefinedAtom.cpp, line 90.
0 lld 0x00000001067986fe
llvm::sys::PrintStackTrace(__sFILE*) + 46
1 lld 0x0000000106799aab
PrintStackTraceSignalHandler(void*) + 27
2 lld 0x0000000106799ef5 SignalHandler(int) + 565
3 libsystem_platform.dylib 0x00007fff8ebb4f1a _sigtramp + 26
4 libsystem_platform.dylib 0x00007fff61c25764 _sigtramp + 3540453476
5 lld 0x0000000106799adb raise + 27
6 lld 0x0000000106799b92 abort + 18
7 lld 0x0000000106799b71 __assert_rtn + 129
8 lld 0x0000000106b7feb7
lld::DefinedAtom::compareByPosition(lld::DefinedAtom const*,
lld::DefinedAtom const*) + 231
9 lld 0x000000010689e60b void std::__1::__sort<bool
(*&)(lld::DefinedAtom const*, lld::DefinedAtom const*), lld::DefinedAtom
const**>(lld::DefinedAtom const**, lld::DefinedAtom const**, bool
(*&)(lld::DefinedAtom const*, lld::DefinedAtom const*)) + 2187
10 lld 0x000000010689b5eb void
lld::detail::parallel_quick_sort<std::__1::__wrap_iter<lld::DefinedAtom
const**>, bool (lld::DefinedAtom const*, lld::DefinedAtom
const*)>(std::__1::__wrap_iter<lld::DefinedAtom const**>,
std::__1::__wrap_iter<lld::DefinedAtom const**>, bool
const(&)(lld::DefinedAtom const*, lld::DefinedAtom const*),
lld::TaskGroup&, unsigned long) + 459
11 lld 0x000000010689b3f1 void
lld::parallel_sort<std::__1::__wrap_iter<lld::DefinedAtom const**>, bool
(lld::DefinedAtom const*, lld::DefinedAtom
const*)>(std::__1::__wrap_iter<lld::DefinedAtom const**>,
std::__1::__wrap_iter<lld::DefinedAtom const**>, bool
const(&)(lld::DefinedAtom const*, lld::DefinedAtom const*)) + 385
12 lld 0x0000000106b0dcb7
lld::elf::OrderPass::perform(std::__1::unique_ptr<lld::MutableFile,
std::__1::default_delete<lld::MutableFile> >&) + 311
13 lld 0x000000010668f9a6
lld::PassManager::runOnFile(std::__1::unique_ptr<lld::MutableFile,
std::__1::default_delete<lld::MutableFile> >&) + 454
14 lld 0x000000010668d189
lld::Driver::link(lld::LinkingContext&, llvm::raw_ostream&) + 7065
15 lld 0x000000010669c569
lld::GnuLdDriver::linkELF(int, char const**, llvm::raw_ostream&) + 1113
16 lld 0x00000001066b7ade
lld::UniversalDriver::link(int, char const**, llvm::raw_ostream&) + 1454
17 lld 0x000000010667b5e6 main + 86
18 libdyld.dylib 0x00007fff965ee5c9 start + 1
Stack dump:
0. Program arguments: lld -target x86_64
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/1.o
--start-group
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/libfn.a
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/libfn1.a
--end-group -o
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.tmp1
-flavor gnu
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.script:
line 14: 12872 Illegal instruction: 4 lld -flavor gnu -target x86_64
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/1.o
--start-group
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/libfn.a
/Users/rafael/p/llvm/tools/lld/test/elf/X86_64/Inputs/group/libfn1.a
--end-group -o
/Users/rafael/p/obj/tools/lld/test/elf/X86_64/Output/startGroupEndGroup.test.tmp1
--
********************
Testing: 0 .. 10.. 20.. 30.. 40.
FAIL: lld :: elf/init_array.test (302 of 651)
******************** TEST 'lld :: elf/init_array.test' FAILED
********************
Script:
--
lld -flavor gnu -target x86_64-linux -o
/Users/rafael/p/obj/tools/lld/test/elf/Output/init_array.test.tmp
/Users/rafael/p/llvm/tools/lld/test/elf/Inputs/init_array.x86-64 -e
__init_array_start
llvm-objdump -t -section-headers
/Users/rafael/p/obj/tools/lld/test/elf/Output/init_array.test.tmp |
FileCheck /Users/rafael/p/llvm/tools/lld/test/elf/init_array.test
--
Exit Code: 132
Command Output (stderr):
--
Assertion failed: (lhs->ordinal() != rhs->ordinal()), function
compareByPosition, file
/Users/rafael/p/llvm/tools/lld/lib/Core/DefinedAtom.cpp, line 90.
0 lld 0x0000000105e4f6fe
llvm::sys::PrintStackTrace(__sFILE*) + 46
1 lld 0x0000000105e50aab
PrintStackTraceSignalHandler(void*) + 27
2 lld 0x0000000105e50ef5 SignalHandler(int) + 565
3 libsystem_platform.dylib 0x00007fff8ebb4f1a _sigtramp + 26
4 libsystem_platform.dylib 0x0000000000000002 _sigtramp + 1900327170
5 lld 0x0000000105e50adb raise + 27
6 lld 0x0000000105e50b92 abort + 18
7 lld 0x0000000105e50b71 __assert_rtn + 129
8 lld 0x0000000106236eb7
lld::DefinedAtom::compareByPosition(lld::DefinedAtom const*,
lld::DefinedAtom const*) + 231
9 lld 0x0000000105f5560b void std::__1::__sort<bool
(*&)(lld::DefinedAtom const*, lld::DefinedAtom const*), lld::DefinedAtom
const**>(lld::DefinedAtom const**, lld::DefinedAtom const**, bool
(*&)(lld::DefinedAtom const*, lld::DefinedAtom const*)) + 2187
10 lld 0x0000000105f525eb void
lld::detail::parallel_quick_sort<std::__1::__wrap_iter<lld::DefinedAtom
const**>, bool (lld::DefinedAtom const*, lld::DefinedAtom
const*)>(std::__1::__wrap_iter<lld::DefinedAtom const**>,
std::__1::__wrap_iter<lld::DefinedAtom const**>, bool
const(&)(lld::DefinedAtom const*, lld::DefinedAtom const*),
lld::TaskGroup&, unsigned long) + 459
11 lld 0x0000000105f523f1 void
lld::parallel_sort<std::__1::__wrap_iter<lld::DefinedAtom const**>, bool
(lld::DefinedAtom const*, lld::DefinedAtom
const*)>(std::__1::__wrap_iter<lld::DefinedAtom const**>,
std::__1::__wrap_iter<lld::DefinedAtom const**>, bool
const(&)(lld::DefinedAtom const*, lld::DefinedAtom const*)) + 385
12 lld 0x00000001061c4cb7
lld::elf::OrderPass::perform(std::__1::unique_ptr<lld::MutableFile,
std::__1::default_delete<lld::MutableFile> >&) + 311
13 lld 0x0000000105d469a6
lld::PassManager::runOnFile(std::__1::unique_ptr<lld::MutableFile,
std::__1::default_delete<lld::MutableFile> >&) + 454
14 lld 0x0000000105d44189
lld::Driver::link(lld::LinkingContext&, llvm::raw_ostream&) + 7065
15 lld 0x0000000105d53569
lld::GnuLdDriver::linkELF(int, char const**, llvm::raw_ostream&) + 1113
16 lld 0x0000000105d6eade
lld::UniversalDriver::link(int, char const**, llvm::raw_ostream&) + 1454
17 lld 0x0000000105d325e6 main + 86
18 libdyld.dylib 0x00007fff965ee5c9 start + 1
19 libdyld.dylib 0x000000000000000a start + 1772165698
Stack dump:
0. Program arguments: lld -target x86_64-linux -o
/Users/rafael/p/obj/tools/lld/test/elf/Output/init_array.test.tmp
/Users/rafael/p/llvm/tools/lld/test/elf/Inputs/init_array.x86-64 -e
__init_array_start -flavor gnu
/Users/rafael/p/obj/tools/lld/test/elf/Output/init_array.test.script: line
2: 13049 Illegal instruction: 4 lld -flavor gnu -target x86_64-linux -o
/Users/rafael/p/obj/tools/lld/test/elf/Output/init_array.test.tmp
/Users/rafael/p/llvm/tools/lld/test/elf/Inputs/init_array.x86-64 -e
__init_array_start
--
********************
Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
Testing Time: 2.94s
********************
Failing Tests (2):
lld :: elf/X86_64/startGroupEndGroup.test
lld :: elf/init_array.test
Expected Passes : 616
Expected Failures : 1
Unsupported Tests : 32
Unexpected Failures: 2
On Sat, Jan 31, 2015 at 12:05 AM, Rui Ueyama <ruiu at google.com> wrote:
> Author: ruiu
> Date: Fri Jan 30 20:05:01 2015
> New Revision: 227666
>
> URL: http://llvm.org/viewvc/llvm-project?rev=227666&view=rev
> Log:
> 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
>
> Added:
> lld/trunk/lib/ReaderWriter/ELF/OrderPass.h
> Removed:
> lld/trunk/lib/ReaderWriter/ELF/ArrayOrderPass.cpp
> lld/trunk/lib/ReaderWriter/ELF/ArrayOrderPass.h
> lld/trunk/test/elf/X86_64/orderatoms-by-override.test
> Modified:
> lld/trunk/include/lld/Core/DefinedAtom.h
> lld/trunk/lib/Core/DefinedAtom.cpp
> lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt
> lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
> lld/trunk/lib/ReaderWriter/PECOFF/OrderPass.h
> lld/trunk/test/elf/AArch64/defsym.test
> lld/trunk/test/elf/Hexagon/dynlib-gotoff.test
> lld/trunk/test/elf/Hexagon/zerofillquick-sdata.test
> lld/trunk/test/elf/Mips/dynlib-dynsym-micro.test
> lld/trunk/test/elf/Mips/dynlib-dynsym.test
> lld/trunk/test/elf/Mips/got16-micro.test
> lld/trunk/test/elf/Mips/got16.test
> lld/trunk/test/elf/Mips/rel-dynamic-02.test
> lld/trunk/test/elf/Mips/rel-dynamic-11.test
> lld/trunk/test/elf/check.test
> lld/trunk/test/elf/dynamic.test
> lld/trunk/test/elf/gotpcrel.test
> lld/trunk/test/elf/hexagon-quickdata-sort.test
> lld/trunk/test/elf/hexagon-quickdata-sortcommon.test
> lld/trunk/test/elf/ifunc.test
> lld/trunk/test/elf/quickdata.test
> lld/trunk/test/elf/tls.test
> lld/trunk/test/elf/x86-64-dynamic.test
>
> Modified: lld/trunk/include/lld/Core/DefinedAtom.h
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/DefinedAtom.h?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/include/lld/Core/DefinedAtom.h (original)
> +++ lld/trunk/include/lld/Core/DefinedAtom.h Fri Jan 30 20:05:01 2015
> @@ -349,6 +349,10 @@ public:
> atomContentType == DefinedAtom::typeGnuLinkOnce);
> }
>
> + // Returns true if lhs should be placed before rhs in the final output.
> + static bool compareByPosition(const DefinedAtom *lhs,
> + const DefinedAtom *rhs);
> +
> protected:
> // DefinedAtom is an abstract base class. Only subclasses can access
> // constructor.
>
> Modified: lld/trunk/lib/Core/DefinedAtom.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Core/DefinedAtom.cpp?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/lib/Core/DefinedAtom.cpp (original)
> +++ lld/trunk/lib/Core/DefinedAtom.cpp Fri Jan 30 20:05:01 2015
> @@ -9,11 +9,10 @@
>
> #include "llvm/Support/ErrorHandling.h"
> #include "lld/Core/DefinedAtom.h"
> -
> +#include "lld/Core/File.h"
>
> namespace lld {
>
> -
> DefinedAtom::ContentPermissions DefinedAtom::permissions() const {
> // By default base permissions on content type.
> return permissions(this->contentType());
> @@ -82,6 +81,14 @@ DefinedAtom::ContentPermissions DefinedA
> llvm_unreachable("unknown content type");
> }
>
> +bool DefinedAtom::compareByPosition(const DefinedAtom *lhs,
> + const DefinedAtom *rhs) {
> + const File *lhsFile = &lhs->file();
> + const File *rhsFile = &rhs->file();
> + if (lhsFile->ordinal() != rhsFile->ordinal())
> + return lhsFile->ordinal() < rhsFile->ordinal();
> + assert(lhs->ordinal() != rhs->ordinal());
> + return lhs->ordinal() < rhs->ordinal();
> +}
>
> } // namespace
> -
>
> Removed: lld/trunk/lib/ReaderWriter/ELF/ArrayOrderPass.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ArrayOrderPass.cpp?rev=227665&view=auto
>
> ==============================================================================
> --- lld/trunk/lib/ReaderWriter/ELF/ArrayOrderPass.cpp (original)
> +++ lld/trunk/lib/ReaderWriter/ELF/ArrayOrderPass.cpp (removed)
> @@ -1,56 +0,0 @@
> -//===- lib/ReaderWriter/ELF/ArrayOrderPass.cpp
> ----------------------------===//
> -//
> -// The LLVM Linker
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
>
> -//===----------------------------------------------------------------------===//
> -
> -#include "ArrayOrderPass.h"
> -#include <algorithm>
> -#include <limits>
> -
> -namespace lld {
> -namespace elf {
> -void ArrayOrderPass::perform(std::unique_ptr<MutableFile> &f) {
> - auto definedAtoms = f->definedAtoms();
> -
> - // Move sections need to be sorted into the separate continious group.
> - // That reduces a number of sorting elements and simplifies conditions
> - // in the sorting predicate.
> - auto last = std::stable_partition(definedAtoms.begin(),
> definedAtoms.end(),
> - [](const DefinedAtom *atom) {
> - if (atom->sectionChoice() != DefinedAtom::sectionCustomRequired)
> - return false;
> -
> - StringRef name = atom->customSectionName();
> - return name.startswith(".init_array") ||
> name.startswith(".fini_array");
> - });
> -
> - std::stable_sort(definedAtoms.begin(), last,
> - [](const DefinedAtom *left, const DefinedAtom *right) {
> - StringRef leftSec = left->customSectionName();
> - StringRef rightSec = right->customSectionName();
> -
> - // Drop the front dot from the section name and get
> - // an optional section's number starting after the second dot.
> - StringRef leftNum = leftSec.drop_front().rsplit('.').second;
> - StringRef rightNum = rightSec.drop_front().rsplit('.').second;
> -
> - // Sort {.init_array, .fini_array}[.<num>] sections
> - // according to their number. Sections without optional
> - // numer suffix should go last.
> -
> - uint32_t leftPriority;
> - uint32_t rightPriority;
> - if (leftNum.getAsInteger(10, leftPriority))
> - leftPriority = std::numeric_limits<uint32_t>::max();
> - if (rightNum.getAsInteger(10, rightPriority))
> - rightPriority = std::numeric_limits<uint32_t>::max();
> -
> - return leftPriority < rightPriority;
> - });
> -}
> -} // end namespace elf
> -} // end namespace lld
>
> Removed: lld/trunk/lib/ReaderWriter/ELF/ArrayOrderPass.h
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ArrayOrderPass.h?rev=227665&view=auto
>
> ==============================================================================
> --- lld/trunk/lib/ReaderWriter/ELF/ArrayOrderPass.h (original)
> +++ lld/trunk/lib/ReaderWriter/ELF/ArrayOrderPass.h (removed)
> @@ -1,26 +0,0 @@
> -//===- lib/ReaderWriter/ELF/ArrayOrderPass.h
> ------------------------------===//
> -//
> -// The LLVM Linker
> -//
> -// This file is distributed under the University of Illinois Open Source
> -// License. See LICENSE.TXT for details.
> -//
>
> -//===----------------------------------------------------------------------===//
> -
> -#ifndef LLD_READER_WRITER_ELF_ARRAY_ORDER_PASS_H
> -#define LLD_READER_WRITER_ELF_ARRAY_ORDER_PASS_H
> -
> -#include "lld/Core/Pass.h"
> -
> -namespace lld {
> -namespace elf {
> -/// \brief This pass sorts atoms in .{init,fini}_array.<priority>
> sections.
> -class ArrayOrderPass : public Pass {
> -public:
> - ArrayOrderPass() : Pass() {}
> - void perform(std::unique_ptr<MutableFile> &mergedFile) override;
> -};
> -}
> -}
> -
> -#endif
>
> Modified: lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt (original)
> +++ lld/trunk/lib/ReaderWriter/ELF/CMakeLists.txt Fri Jan 30 20:05:01 2015
> @@ -1,5 +1,4 @@
> add_llvm_library(lldELF
> - ArrayOrderPass.cpp
> ELFLinkingContext.cpp
> Reader.cpp
> Writer.cpp
>
> Modified: lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp (original)
> +++ lld/trunk/lib/ReaderWriter/ELF/ELFLinkingContext.cpp Fri Jan 30
> 20:05:01 2015
> @@ -8,12 +8,11 @@
>
> //===----------------------------------------------------------------------===//
>
> #include "lld/ReaderWriter/ELFLinkingContext.h"
> -#include "ArrayOrderPass.h"
> #include "ELFFile.h"
> +#include "OrderPass.h"
> #include "TargetHandler.h"
> #include "lld/Core/Instrumentation.h"
> #include "lld/Core/SharedLibraryFile.h"
> -#include "lld/Passes/LayoutPass.h"
> #include "lld/Passes/RoundTripYAMLPass.h"
> #include "llvm/ADT/Triple.h"
> #include "llvm/Config/config.h"
> @@ -66,8 +65,7 @@ ELFLinkingContext::ELFLinkingContext(
> _finiFunction("_fini"), _sysrootPath("") {}
>
> void ELFLinkingContext::addPasses(PassManager &pm) {
> - pm.add(std::unique_ptr<Pass>(new LayoutPass(registry())));
> - pm.add(std::unique_ptr<Pass>(new elf::ArrayOrderPass()));
> + pm.add(std::unique_ptr<Pass>(new elf::OrderPass()));
> }
>
> uint16_t ELFLinkingContext::getOutputMachine() const {
>
> Added: lld/trunk/lib/ReaderWriter/ELF/OrderPass.h
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/OrderPass.h?rev=227666&view=auto
>
> ==============================================================================
> --- lld/trunk/lib/ReaderWriter/ELF/OrderPass.h (added)
> +++ lld/trunk/lib/ReaderWriter/ELF/OrderPass.h Fri Jan 30 20:05:01 2015
> @@ -0,0 +1,70 @@
> +//===- lib/ReaderWriter/ELF/OrderPass.h
> -----------------------------------===//
> +//
> +// The LLVM Linker
> +//
> +// This file is distributed under the University of Illinois Open Source
> +// License. See LICENSE.TXT for details.
> +//
>
> +//===----------------------------------------------------------------------===//
> +
> +#ifndef LLD_READER_WRITER_ELF_ORDER_PASS_H
> +#define LLD_READER_WRITER_ELF_ORDER_PASS_H
> +
> +#include "lld/Core/Parallel.h"
> +#include <algorithm>
> +#include <limits>
> +
> +namespace lld {
> +namespace elf {
> +
> +/// \brief This pass sorts atoms by file and atom ordinals.
> +/// .{init,fini}_array.<priority> sections are handled specially.
> +class OrderPass : public Pass {
> +public:
> + void perform(std::unique_ptr<MutableFile> &file) override {
> + MutableFile::DefinedAtomRange defined = file->definedAtoms();
> + auto last = std::partition(defined.begin(), defined.end(),
> isInitFini);
> + parallel_sort(defined.begin(), last, compareInitFini);
> + parallel_sort(last, defined.end(), DefinedAtom::compareByPosition);
> + }
> +
> +private:
> + static bool isInitFini(const DefinedAtom *atom) {
> + if (atom->sectionChoice() != DefinedAtom::sectionCustomRequired)
> + return false;
> + StringRef name = atom->customSectionName();
> + return name.startswith(".init_array") ||
> name.startswith(".fini_array");
> + }
> +
> + static bool compareInitFini(const DefinedAtom *lhs, const DefinedAtom
> *rhs) {
> + StringRef lhsSec = lhs->customSectionName();
> + StringRef rhsSec = rhs->customSectionName();
> +
> + // Drop the front dot from the section name and get
> + // an optional section's number starting after the second dot.
> + StringRef lhsNum = lhsSec.drop_front().rsplit('.').second;
> + StringRef rhsNum = rhsSec.drop_front().rsplit('.').second;
> +
> + // Sort {.init_array, .fini_array}[.<num>] sections
> + // according to their number. Sections without optional
> + // numer suffix should go last.
> +
> + uint32_t lhsPriority;
> + uint32_t rhsPriority;
> + if (lhsNum.getAsInteger(10, lhsPriority))
> + lhsPriority = std::numeric_limits<uint32_t>::max();
> + if (rhsNum.getAsInteger(10, rhsPriority))
> + rhsPriority = std::numeric_limits<uint32_t>::max();
> +
> + if (lhsPriority != rhsPriority)
> + return lhsPriority < rhsPriority;
> +
> + // If both atoms have the same priority, fall back to default.
> + return DefinedAtom::compareByPosition(lhs, rhs);
> + }
> +};
> +
> +}
> +}
> +
> +#endif
>
> Modified: lld/trunk/lib/ReaderWriter/PECOFF/OrderPass.h
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/OrderPass.h?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/lib/ReaderWriter/PECOFF/OrderPass.h (original)
> +++ lld/trunk/lib/ReaderWriter/PECOFF/OrderPass.h Fri Jan 30 20:05:01 2015
> @@ -37,15 +37,6 @@
> namespace lld {
> namespace pecoff {
>
> -static bool compareByPosition(const DefinedAtom *lhs, const DefinedAtom
> *rhs) {
> - const File *lhsFile = &lhs->file();
> - const File *rhsFile = &rhs->file();
> - if (lhsFile->ordinal() != rhsFile->ordinal())
> - return lhsFile->ordinal() < rhsFile->ordinal();
> - assert(lhs->ordinal() != rhs->ordinal());
> - return lhs->ordinal() < rhs->ordinal();
> -}
> -
> static bool compare(const DefinedAtom *lhs, const DefinedAtom *rhs) {
> bool lhsCustom = (lhs->sectionChoice() ==
> DefinedAtom::sectionCustomRequired);
> bool rhsCustom = (rhs->sectionChoice() ==
> DefinedAtom::sectionCustomRequired);
> @@ -53,13 +44,13 @@ static bool compare(const DefinedAtom *l
> int cmp = lhs->customSectionName().compare(rhs->customSectionName());
> if (cmp != 0)
> return cmp < 0;
> - return compareByPosition(lhs, rhs);
> + return DefinedAtom::compareByPosition(lhs, rhs);
> }
> if (lhsCustom && !rhsCustom)
> return true;
> if (!lhsCustom && rhsCustom)
> return false;
> - return compareByPosition(lhs, rhs);
> + return DefinedAtom::compareByPosition(lhs, rhs);
> }
>
> class OrderPass : public lld::Pass {
>
> Modified: lld/trunk/test/elf/AArch64/defsym.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/AArch64/defsym.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/AArch64/defsym.test (original)
> +++ lld/trunk/test/elf/AArch64/defsym.test Fri Jan 30 20:05:01 2015
> @@ -12,7 +12,7 @@ CHECK: Other: 0
> CHECK: Section: .text (0x5)
> CHECK: }
> CHECK: Symbol {
> -CHECK: Name: fn (6)
> +CHECK: Name: fn (11)
> CHECK: Value: 0x4001A4
> CHECK: Size: 8
> CHECK: Binding: Global (0x1)
>
> Modified: lld/trunk/test/elf/Hexagon/dynlib-gotoff.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Hexagon/dynlib-gotoff.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/Hexagon/dynlib-gotoff.test (original)
> +++ lld/trunk/test/elf/Hexagon/dynlib-gotoff.test Fri Jan 30 20:05:01 2015
> @@ -3,6 +3,63 @@ RUN: lld -flavor gnu -target hexagon %p/
> RUN: -o %t --output-filetype=yaml -shared --noinhibit-exec
> RUN: FileCheck -check-prefix=CHECKGOTPLT %s < %t
>
> + - name: .PLT0
> +CHECKGOTPLT: type: stub
> +CHECKGOTPLT: content: [ 00, 40, 00, 00, 1C, C0, 49, 6A, 0E,
> 42, 9C, E2,
> +CHECKGOTPLT: 4F, 40, 9C, 91, 3C, C0, 9C, 91, 0E,
> 42, 0E, 8C,
> +CHECKGOTPLT: 00, C0, 9C, 52 ]
> +CHECKGOTPLT: alignment: 2^4
> +CHECKGOTPLT: section-name: .plt
> +CHECKGOTPLT: references:
> +CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X
> +CHECKGOTPLT: offset: 0
> + target: __got0
> +CHECKGOTPLT: - kind: R_HEX_6_PCREL_X
> +CHECKGOTPLT: offset: 4
> + target: __got0
> +CHECKGOTPLT: addend: 4
> + - name: __plt_fn
> +CHECKGOTPLT: type: stub
> +CHECKGOTPLT: content: [ 00, 40, 00, 00, 0E, C0, 49, 6A, 1C,
> C0, 8E, 91,
> +CHECKGOTPLT: 00, C0, 9C, 52 ]
> +CHECKGOTPLT: alignment: 2^4
> +CHECKGOTPLT: section-name: .plt
> +CHECKGOTPLT: references:
> +CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X
> +CHECKGOTPLT: offset: 0
> + target: __got_fn
> +CHECKGOTPLT: - kind: R_HEX_6_PCREL_X
> +CHECKGOTPLT: offset: 4
> + target: __got_fn
> +CHECKGOTPLT: addend: 4
> + - name: __plt_fn1
> +CHECKGOTPLT: type: stub
> +CHECKGOTPLT: content: [ 00, 40, 00, 00, 0E, C0, 49, 6A, 1C,
> C0, 8E, 91,
> +CHECKGOTPLT: 00, C0, 9C, 52 ]
> +CHECKGOTPLT: alignment: 2^4
> +CHECKGOTPLT: section-name: .plt
> +CHECKGOTPLT: references:
> +CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X
> +CHECKGOTPLT: offset: 0
> + target: __got_fn1
> +CHECKGOTPLT: - kind: R_HEX_6_PCREL_X
> +CHECKGOTPLT: offset: 4
> + target: __got_fn1
> +CHECKGOTPLT: addend: 4
> + - name: __plt_fn2
> +CHECKGOTPLT: type: stub
> +CHECKGOTPLT: content: [ 00, 40, 00, 00, 0E, C0, 49, 6A, 1C,
> C0, 8E, 91,
> +CHECKGOTPLT: 00, C0, 9C, 52 ]
> +CHECKGOTPLT: alignment: 2^4
> +CHECKGOTPLT: section-name: .plt
> +CHECKGOTPLT: references:
> +CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X
> +CHECKGOTPLT: offset: 0
> + target: __got_fn2
> +CHECKGOTPLT: - kind: R_HEX_6_PCREL_X
> +CHECKGOTPLT: offset: 4
> + target: __got_fn2
> +CHECKGOTPLT: addend: 4
> - name: __got0
> CHECKGOTPLT: type: got
> CHECKGOTPLT: content: [ 00, 00, 00, 00, 00, 00, 00, 00, 00,
> 00, 00, 00,
> @@ -69,60 +126,3 @@ CHECKGOTPLT: target: fn2
> CHECKGOTPLT: - kind: R_HEX_32
> CHECKGOTPLT: offset: 0
> target: .PLT0
> - - name: .PLT0
> -CHECKGOTPLT: type: stub
> -CHECKGOTPLT: content: [ 00, 40, 00, 00, 1C, C0, 49, 6A, 0E,
> 42, 9C, E2,
> -CHECKGOTPLT: 4F, 40, 9C, 91, 3C, C0, 9C, 91, 0E,
> 42, 0E, 8C,
> -CHECKGOTPLT: 00, C0, 9C, 52 ]
> -CHECKGOTPLT: alignment: 2^4
> -CHECKGOTPLT: section-name: .plt
> -CHECKGOTPLT: references:
> -CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X
> -CHECKGOTPLT: offset: 0
> - target: __got0
> -CHECKGOTPLT: - kind: R_HEX_6_PCREL_X
> -CHECKGOTPLT: offset: 4
> - target: __got0
> -CHECKGOTPLT: addend: 4
> - - name: __plt_fn
> -CHECKGOTPLT: type: stub
> -CHECKGOTPLT: content: [ 00, 40, 00, 00, 0E, C0, 49, 6A, 1C,
> C0, 8E, 91,
> -CHECKGOTPLT: 00, C0, 9C, 52 ]
> -CHECKGOTPLT: alignment: 2^4
> -CHECKGOTPLT: section-name: .plt
> -CHECKGOTPLT: references:
> -CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X
> -CHECKGOTPLT: offset: 0
> - target: __got_fn
> -CHECKGOTPLT: - kind: R_HEX_6_PCREL_X
> -CHECKGOTPLT: offset: 4
> - target: __got_fn
> -CHECKGOTPLT: addend: 4
> - - name: __plt_fn1
> -CHECKGOTPLT: type: stub
> -CHECKGOTPLT: content: [ 00, 40, 00, 00, 0E, C0, 49, 6A, 1C,
> C0, 8E, 91,
> -CHECKGOTPLT: 00, C0, 9C, 52 ]
> -CHECKGOTPLT: alignment: 2^4
> -CHECKGOTPLT: section-name: .plt
> -CHECKGOTPLT: references:
> -CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X
> -CHECKGOTPLT: offset: 0
> - target: __got_fn1
> -CHECKGOTPLT: - kind: R_HEX_6_PCREL_X
> -CHECKGOTPLT: offset: 4
> - target: __got_fn1
> -CHECKGOTPLT: addend: 4
> - - name: __plt_fn2
> -CHECKGOTPLT: type: stub
> -CHECKGOTPLT: content: [ 00, 40, 00, 00, 0E, C0, 49, 6A, 1C,
> C0, 8E, 91,
> -CHECKGOTPLT: 00, C0, 9C, 52 ]
> -CHECKGOTPLT: alignment: 2^4
> -CHECKGOTPLT: section-name: .plt
> -CHECKGOTPLT: references:
> -CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X
> -CHECKGOTPLT: offset: 0
> - target: __got_fn2
> -CHECKGOTPLT: - kind: R_HEX_6_PCREL_X
> -CHECKGOTPLT: offset: 4
> - target: __got_fn2
> -CHECKGOTPLT: addend: 4
>
> Modified: lld/trunk/test/elf/Hexagon/zerofillquick-sdata.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Hexagon/zerofillquick-sdata.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/Hexagon/zerofillquick-sdata.test (original)
> +++ lld/trunk/test/elf/Hexagon/zerofillquick-sdata.test Fri Jan 30
> 20:05:01 2015
> @@ -9,7 +9,7 @@ CHECKSECTIONSANDSIZE: Section {
> CHECKSECTIONSANDSIZE: Name: .sdata (13)
> CHECKSECTIONSANDSIZE: Address: 0x1000
> CHECKSECTIONSANDSIZE: Offset: 0x1000
> -CHECKSECTIONSANDSIZE: Size: 20
> +CHECKSECTIONSANDSIZE: Size: 24
> CHECKSECTIONSANDSIZE: }
> CHECKSECTIONSANDSIZE: Section {
> CHECKSECTIONSANDSIZE: Name: .bss (20)
>
> Modified: lld/trunk/test/elf/Mips/dynlib-dynsym-micro.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/dynlib-dynsym-micro.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/Mips/dynlib-dynsym-micro.test (original)
> +++ lld/trunk/test/elf/Mips/dynlib-dynsym-micro.test Fri Jan 30 20:05:01
> 2015
> @@ -78,7 +78,7 @@
> # CHECK-GOT: section-choice: custom-required
> # CHECK-GOT: section-name: .got
> # CHECK-GOT: permissions: rw-
> -# CHECK-GOT: - ref-name: L002
> +# CHECK-GOT: - ref-name: L000
> # CHECK-GOT: type: got
> # CHECK-GOT: content: [ 00, 00, 00, 00 ]
> # CHECK-GOT: alignment: 2^2
> @@ -88,8 +88,8 @@
> # CHECK-GOT: references:
> # CHECK-GOT: - kind: LLD_R_MIPS_32_HI16
> # CHECK-GOT: offset: 0
> -# CHECK-GOT: target: L003
> -# CHECK-GOT: - ref-name: L004
> +# CHECK-GOT: target: L007
> +# CHECK-GOT: - ref-name: L002
> # CHECK-GOT: type: got
> # CHECK-GOT: content: [ 00, 00, 00, 00 ]
> # CHECK-GOT: alignment: 2^2
> @@ -99,8 +99,8 @@
> # CHECK-GOT: references:
> # CHECK-GOT: - kind: LLD_R_MIPS_32_HI16
> # CHECK-GOT: offset: 0
> -# CHECK-GOT: target: L005
> -# CHECK-GOT: - ref-name: L006
> +# CHECK-GOT: target: L008
> +# CHECK-GOT: - ref-name: L004
> # CHECK-GOT: type: got
> # CHECK-GOT: content: [ 00, 00, 00, 00 ]
> # CHECK-GOT: alignment: 2^2
> @@ -111,7 +111,7 @@
> # CHECK-GOT: - kind: LLD_R_MIPS_GLOBAL_GOT
> # CHECK-GOT: offset: 0
> # CHECK-GOT: target: foo
> -# CHECK-GOT: - ref-name: L007
> +# CHECK-GOT: - ref-name: L005
> # CHECK-GOT: type: got
> # CHECK-GOT: content: [ 00, 00, 00, 00 ]
> # CHECK-GOT: alignment: 2^2
> @@ -122,7 +122,7 @@
> # CHECK-GOT: - kind: LLD_R_MIPS_GLOBAL_GOT
> # CHECK-GOT: offset: 0
> # CHECK-GOT: target: ext1
> -# CHECK-GOT: - ref-name: L008
> +# CHECK-GOT: - ref-name: L006
> # CHECK-GOT: type: got
> # CHECK-GOT: content: [ 00, 00, 00, 00 ]
> # CHECK-GOT: alignment: 2^2
>
> Modified: lld/trunk/test/elf/Mips/dynlib-dynsym.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/dynlib-dynsym.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/Mips/dynlib-dynsym.test (original)
> +++ lld/trunk/test/elf/Mips/dynlib-dynsym.test Fri Jan 30 20:05:01 2015
> @@ -74,7 +74,7 @@
> # CHECK-GOT: section-choice: custom-required
> # CHECK-GOT: section-name: .got
> # CHECK-GOT: permissions: rw-
> -# CHECK-GOT: - ref-name: L002
> +# CHECK-GOT: - ref-name: L000
> # CHECK-GOT: type: got
> # CHECK-GOT: content: [ 00, 00, 00, 00 ]
> # CHECK-GOT: alignment: 2^2
> @@ -84,8 +84,8 @@
> # CHECK-GOT: references:
> # CHECK-GOT: - kind: LLD_R_MIPS_32_HI16
> # CHECK-GOT: offset: 0
> -# CHECK-GOT: target: L003
> -# CHECK-GOT: - ref-name: L004
> +# CHECK-GOT: target: L007
> +# CHECK-GOT: - ref-name: L002
> # CHECK-GOT: type: got
> # CHECK-GOT: content: [ 00, 00, 00, 00 ]
> # CHECK-GOT: alignment: 2^2
> @@ -95,8 +95,8 @@
> # CHECK-GOT: references:
> # CHECK-GOT: - kind: LLD_R_MIPS_32_HI16
> # CHECK-GOT: offset: 0
> -# CHECK-GOT: target: L005
> -# CHECK-GOT: - ref-name: L006
> +# CHECK-GOT: target: L008
> +# CHECK-GOT: - ref-name: L004
> # CHECK-GOT: type: got
> # CHECK-GOT: content: [ 00, 00, 00, 00 ]
> # CHECK-GOT: alignment: 2^2
> @@ -107,7 +107,7 @@
> # CHECK-GOT: - kind: LLD_R_MIPS_GLOBAL_GOT
> # CHECK-GOT: offset: 0
> # CHECK-GOT: target: foo
> -# CHECK-GOT: - ref-name: L007
> +# CHECK-GOT: - ref-name: L005
> # CHECK-GOT: type: got
> # CHECK-GOT: content: [ 00, 00, 00, 00 ]
> # CHECK-GOT: alignment: 2^2
> @@ -118,7 +118,7 @@
> # CHECK-GOT: - kind: LLD_R_MIPS_GLOBAL_GOT
> # CHECK-GOT: offset: 0
> # CHECK-GOT: target: ext1
> -# CHECK-GOT: - ref-name: L008
> +# CHECK-GOT: - ref-name: L006
> # CHECK-GOT: type: got
> # CHECK-GOT: content: [ 00, 00, 00, 00 ]
> # CHECK-GOT: alignment: 2^2
>
> Modified: lld/trunk/test/elf/Mips/got16-micro.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/got16-micro.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/Mips/got16-micro.test (original)
> +++ lld/trunk/test/elf/Mips/got16-micro.test Fri Jan 30 20:05:01 2015
> @@ -10,8 +10,39 @@
> # RUN: llvm-objdump -t -disassemble -mattr=micromips %t2 \
> # RUN: | FileCheck -check-prefix RAW %s
>
> +# Function glob
> +# YAML: - name: main
> +# YAML: scope: global
> +# YAML: content: [ 5C, FC, 00, 00, 42, 30, 00, 00, 5C, FC,
> 00, 00,
> +# YAML: 42, 30, 00, 00, 5C, FC, 00, 00, 5C, FC,
> 00, 00,
> +# YAML: 5C, FC, 00, 00 ]
> +# YAML: alignment: 4 mod 2^4
> +# YAML: code-model: mips-micro
> +# YAML: references:
> +# YAML-NEXT: - kind: R_MICROMIPS_GOT16
> +# YAML-NEXT: offset: 0
> +# YAML-NEXT: target: L000
> +# YAML-NEXT: - kind: R_MICROMIPS_LO16
> +# YAML-NEXT: offset: 4
> +# YAML-NEXT: target: data_1
> +# YAML-NEXT: - kind: R_MICROMIPS_GOT16
> +# YAML-NEXT: offset: 8
> +# YAML-NEXT: target: L001
> +# YAML-NEXT: - kind: R_MICROMIPS_LO16
> +# YAML-NEXT: offset: 12
> +# YAML-NEXT: target: data_2
> +# YAML-NEXT: - kind: R_MICROMIPS_GOT16
> +# YAML-NEXT: offset: 16
> +# YAML-NEXT: target: L002
> +# YAML-NEXT: - kind: R_MICROMIPS_CALL16
> +# YAML-NEXT: offset: 20
> +# YAML-NEXT: target: L003
> +# YAML-NEXT: - kind: R_MICROMIPS_CALL16
> +# YAML-NEXT: offset: 24
> +# YAML-NEXT: target: L004
> +
> # Local GOT entries:
> -# YAML: - ref-name: L001
> +# YAML: - ref-name: L000
> # YAML-NEXT: type: got
> # YAML-NEXT: content: [ 00, 00, 00, 00 ]
> # YAML-NEXT: alignment: 2^2
> @@ -22,7 +53,7 @@
> # YAML-NEXT: - kind: LLD_R_MIPS_32_HI16
> # YAML-NEXT: offset: 0
> # YAML-NEXT: target: data_1
> -# YAML-NEXT: - ref-name: L002
> +# YAML-NEXT: - ref-name: L001
> # YAML-NEXT: type: got
> # YAML-NEXT: content: [ 00, 00, 00, 00 ]
> # YAML-NEXT: alignment: 2^2
> @@ -33,7 +64,7 @@
> # YAML-NEXT: - kind: LLD_R_MIPS_32_HI16
> # YAML-NEXT: offset: 0
> # YAML-NEXT: target: data_2
> -# YAML-NEXT: - ref-name: L003
> +# YAML-NEXT: - ref-name: L002
> # YAML-NEXT: type: got
> # YAML-NEXT: content: [ 00, 00, 00, 00 ]
> # YAML-NEXT: alignment: 2^2
> @@ -46,7 +77,7 @@
> # YAML-NEXT: target: data_h
>
> # Global GOT entries:
> -# YAML-NEXT: - ref-name: L004
> +# YAML-NEXT: - ref-name: L003
> # YAML-NEXT: type: got
> # YAML-NEXT: content: [ 00, 00, 00, 00 ]
> # YAML-NEXT: alignment: 2^2
> @@ -60,7 +91,7 @@
> # YAML-NEXT: - kind: R_MIPS_32
> # YAML-NEXT: offset: 0
> # YAML-NEXT: target: bar
> -# YAML-NEXT: - ref-name: L005
> +# YAML-NEXT: - ref-name: L004
> # YAML-NEXT: type: got
> # YAML-NEXT: content: [ 00, 00, 00, 00 ]
> # YAML-NEXT: alignment: 2^2
> @@ -72,37 +103,6 @@
> # YAML-NEXT: offset: 0
> # YAML-NEXT: target: foo
>
> -# Function glob
> -# YAML: - name: main
> -# YAML: scope: global
> -# YAML: content: [ 5C, FC, 00, 00, 42, 30, 00, 00, 5C, FC,
> 00, 00,
> -# YAML: 42, 30, 00, 00, 5C, FC, 00, 00, 5C, FC,
> 00, 00,
> -# YAML: 5C, FC, 00, 00 ]
> -# YAML: alignment: 4 mod 2^4
> -# YAML: code-model: mips-micro
> -# YAML: references:
> -# YAML-NEXT: - kind: R_MICROMIPS_GOT16
> -# YAML-NEXT: offset: 0
> -# YAML-NEXT: target: L001
> -# YAML-NEXT: - kind: R_MICROMIPS_LO16
> -# YAML-NEXT: offset: 4
> -# YAML-NEXT: target: data_1
> -# YAML-NEXT: - kind: R_MICROMIPS_GOT16
> -# YAML-NEXT: offset: 8
> -# YAML-NEXT: target: L002
> -# YAML-NEXT: - kind: R_MICROMIPS_LO16
> -# YAML-NEXT: offset: 12
> -# YAML-NEXT: target: data_2
> -# YAML-NEXT: - kind: R_MICROMIPS_GOT16
> -# YAML-NEXT: offset: 16
> -# YAML-NEXT: target: L003
> -# YAML-NEXT: - kind: R_MICROMIPS_CALL16
> -# YAML-NEXT: offset: 20
> -# YAML-NEXT: target: L004
> -# YAML-NEXT: - kind: R_MICROMIPS_CALL16
> -# YAML-NEXT: offset: 24
> -# YAML-NEXT: target: L005
> -
> # RAW: Disassembly of section .text:
> # RAW: main:
> # RAW-NEXT: 164: 5c fc 18 80 lw $2, -32744($gp)
>
> Modified: lld/trunk/test/elf/Mips/got16.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/got16.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/Mips/got16.test (original)
> +++ lld/trunk/test/elf/Mips/got16.test Fri Jan 30 20:05:01 2015
> @@ -8,8 +8,40 @@
> # RUN: lld -flavor gnu -target mipsel -shared --noinhibit-exec -o %t2 %t.o
> # RUN: llvm-objdump -t -disassemble %t2 | FileCheck -check-prefix RAW %s
>
> +# Function glob
> +# YAML: - name: glob
> +# YAML: scope: global
> +# YAML: content: [ 00, 00, 84, 8F, 00, 00, 84, 24, 01, 00, 84,
> 8F,
> +# YAML: 00, 02, 84, 24, 00, 00, 84, 8F, 00, 00, 84,
> 8F,
> +# YAML: 00, 00, 84, 8F ]
> +# YAML: alignment: 2^2
> +# YAML: references:
> +# YAML: - kind: R_MIPS_GOT16
> +# YAML: offset: 0
> +# YAML: target: L000
> +# YAML: - kind: R_MIPS_LO16
> +# YAML: offset: 4
> +# YAML: target: L009
> +# YAML: - kind: R_MIPS_GOT16
> +# YAML: offset: 8
> +# YAML: target: L002
> +# YAML: addend: 66048
> +# YAML: - kind: R_MIPS_LO16
> +# YAML: offset: 12
> +# YAML: target: L009
> +# YAML: addend: 512
> +# YAML: - kind: R_MIPS_GOT16
> +# YAML: offset: 16
> +# YAML: target: L004
> +# YAML: - kind: R_MIPS_CALL16
> +# YAML: offset: 20
> +# YAML: target: L005
> +# YAML: - kind: R_MIPS_CALL16
> +# YAML: offset: 24
> +# YAML: target: L006
> +
> # Local GOT entries:
> -# YAML: - ref-name: L003
> +# YAML: - ref-name: L000
> # YAML-NEXT: type: got
> # YAML-NEXT: content: [ 00, 00, 00, 00 ]
> # YAML-NEXT: alignment: 2^2
> @@ -19,8 +51,8 @@
> # YAML-NEXT: references:
> # YAML-NEXT: - kind: LLD_R_MIPS_32_HI16
> # YAML-NEXT: offset: 0
> -# YAML-NEXT: target: L006
> -# YAML-NEXT: - ref-name: L005
> +# YAML-NEXT: target: L009
> +# YAML-NEXT: - ref-name: L002
> # YAML-NEXT: type: got
> # YAML-NEXT: content: [ 00, 00, 00, 00 ]
> # YAML-NEXT: alignment: 2^2
> @@ -30,9 +62,9 @@
> # YAML-NEXT: references:
> # YAML-NEXT: - kind: LLD_R_MIPS_32_HI16
> # YAML-NEXT: offset: 0
> -# YAML-NEXT: target: L006
> +# YAML-NEXT: target: L009
> # YAML-NEXT: addend: 66048
> -# YAML-NEXT: - ref-name: L007
> +# YAML-NEXT: - ref-name: L004
> # YAML-NEXT: type: got
> # YAML-NEXT: content: [ 00, 00, 00, 00 ]
> # YAML-NEXT: alignment: 2^2
> @@ -45,7 +77,7 @@
> # YAML-NEXT: target: hidden
>
> # Global GOT entries:
> -# YAML-NEXT: - ref-name: L008
> +# YAML-NEXT: - ref-name: L005
> # YAML-NEXT: type: got
> # YAML-NEXT: content: [ 00, 00, 00, 00 ]
> # YAML-NEXT: alignment: 2^2
> @@ -59,7 +91,7 @@
> # YAML-NEXT: - kind: R_MIPS_32
> # YAML-NEXT: offset: 0
> # YAML-NEXT: target: glob
> -# YAML-NEXT: - ref-name: L009
> +# YAML-NEXT: - ref-name: L006
> # YAML-NEXT: type: got
> # YAML-NEXT: content: [ 00, 00, 00, 00 ]
> # YAML-NEXT: alignment: 2^2
> @@ -71,38 +103,6 @@
> # YAML-NEXT: offset: 0
> # YAML-NEXT: target: extern
>
> -# Function glob
> -# YAML: - name: glob
> -# YAML: scope: global
> -# YAML: content: [ 00, 00, 84, 8F, 00, 00, 84, 24, 01, 00, 84,
> 8F,
> -# YAML: 00, 02, 84, 24, 00, 00, 84, 8F, 00, 00, 84,
> 8F,
> -# YAML: 00, 00, 84, 8F ]
> -# YAML: alignment: 2^2
> -# YAML: references:
> -# YAML: - kind: R_MIPS_GOT16
> -# YAML: offset: 0
> -# YAML: target: L003
> -# YAML: - kind: R_MIPS_LO16
> -# YAML: offset: 4
> -# YAML: target: L006
> -# YAML: - kind: R_MIPS_GOT16
> -# YAML: offset: 8
> -# YAML: target: L005
> -# YAML: addend: 66048
> -# YAML: - kind: R_MIPS_LO16
> -# YAML: offset: 12
> -# YAML: target: L006
> -# YAML: addend: 512
> -# YAML: - kind: R_MIPS_GOT16
> -# YAML: offset: 16
> -# YAML: target: L007
> -# YAML: - kind: R_MIPS_CALL16
> -# YAML: offset: 20
> -# YAML: target: L008
> -# YAML: - kind: R_MIPS_CALL16
> -# YAML: offset: 24
> -# YAML: target: L009
> -
> # RAW: Disassembly of section .text:
> # RAW: glob:
> # RAW-NEXT: 12c: 18 80 84 8f lw $4, -32744($gp)
>
> Modified: lld/trunk/test/elf/Mips/rel-dynamic-02.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/rel-dynamic-02.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/Mips/rel-dynamic-02.test (original)
> +++ lld/trunk/test/elf/Mips/rel-dynamic-02.test Fri Jan 30 20:05:01 2015
> @@ -15,8 +15,8 @@
> #
> # PLT-SYM: Relocations [
> # PLT-SYM-NEXT: Section (4) .rel.dyn {
> -# PLT-SYM-NEXT: 0x2000 R_MIPS_REL32 T1 0x0
> # PLT-SYM-NEXT: 0x140 R_MIPS_REL32 T1 0x0
> +# PLT-SYM-NEXT: 0x2000 R_MIPS_REL32 T1 0x0
> # PLT-SYM-NEXT: }
> # PLT-SYM-NEXT: ]
> #
>
> Modified: lld/trunk/test/elf/Mips/rel-dynamic-11.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Mips/rel-dynamic-11.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/Mips/rel-dynamic-11.test (original)
> +++ lld/trunk/test/elf/Mips/rel-dynamic-11.test Fri Jan 30 20:05:01 2015
> @@ -17,8 +17,8 @@
> #
> # PLT-SYM: Relocations [
> # PLT-SYM-NEXT: Section (4) .rel.dyn {
> -# PLT-SYM-NEXT: 0x2000 R_MIPS_REL32 T1 0x0
> # PLT-SYM-NEXT: 0x150 R_MIPS_REL32 T1 0x0
> +# PLT-SYM-NEXT: 0x2000 R_MIPS_REL32 T1 0x0
> # PLT-SYM-NEXT: }
> # PLT-SYM-NEXT: ]
> #
>
> Removed: lld/trunk/test/elf/X86_64/orderatoms-by-override.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/orderatoms-by-override.test?rev=227665&view=auto
>
> ==============================================================================
> --- lld/trunk/test/elf/X86_64/orderatoms-by-override.test (original)
> +++ lld/trunk/test/elf/X86_64/orderatoms-by-override.test (removed)
> @@ -1,8 +0,0 @@
> -# This testcase tests the behaviour of the layoutpass so that the atoms
> that
> -# appear by their override take preference before proceeding to default
> behaviour
> -RUN: lld -flavor gnu -target x86_64 %p/Inputs/rwint.o \
> -RUN: %p/Inputs/constint.o --output-filetype=yaml -o %t
> --noinhibit-exec
> -RUN: FileCheck %s -check-prefix=CHECKORDER < %t
> -
> -CHECKORDER: - name: b
> -CHECKORDER: - name: a
>
> Modified: lld/trunk/test/elf/check.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/check.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/check.test (original)
> +++ lld/trunk/test/elf/check.test Fri Jan 30 20:05:01 2015
> @@ -8,28 +8,28 @@ RUN: %p/Inputs/object-test.elf-hexago
> RUN: FileCheck %s -check-prefix ELF-hexagon < %t1
>
> ELF-i386: defined-atoms:
> -ELF-i386: - name: global_variable
> -ELF-i386: - name: uninitialized_static_variable
> ELF-i386: - name: global_func
> ELF-i386: - name: static_func
> ELF-i386: - name: weak_func
> ELF-i386: - name: hidden_func
> ELF-i386: - name: no_dead_strip
> ELF-i386: - name: no_special_section_func
> +ELF-i386: - name: global_variable
> +ELF-i386: - name: uninitialized_static_variable
> ELF-i386: - name: special_section_func
> ELF-i386: undefined-atoms:
> ELF-i386: - name: puts
> ELF-i386: absolute-atoms:
> ELF-i386: - name: sample.c
>
> -ELF-hexagon: - name: global_variable
> -ELF-hexagon: - name: uninitialized_static_variable
> ELF-hexagon: - name: global_func
> ELF-hexagon: - name: static_func
> ELF-hexagon: - name: weak_func
> ELF-hexagon: - name: hidden_func
> ELF-hexagon: - name: no_dead_strip
> ELF-hexagon: - name: no_special_section_func
> +ELF-hexagon: - name: global_variable
> +ELF-hexagon: - name: uninitialized_static_variable
> ELF-hexagon: - name: special_section_func
> ELF-hexagon: undefined-atoms:
> ELF-hexagon: - name: puts
>
> Modified: lld/trunk/test/elf/dynamic.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/dynamic.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/dynamic.test (original)
> +++ lld/trunk/test/elf/dynamic.test Fri Jan 30 20:05:01 2015
> @@ -9,10 +9,6 @@ RUN: llvm-objdump -p %t >> %t2
> RUN: llvm-readobj -s -dyn-symbols -dynamic-table %t >> %t2
> RUN: FileCheck %s < %t2
>
> -CHECK: type: got
> -CHECK: references:
> -CHECK: kind: R_X86_64_JUMP_SLOT
> -
> CHECK: name: main
> CHECK: kind: R_X86_64_PC32
> CHECK: offset: 18
> @@ -21,6 +17,10 @@ CHECK: target: [[PLTNAME:[-a-zA-Z0-9_]+
> CHECK: name: [[PLTNAME]]
> CHECK: type: stub
>
> +CHECK: type: got
> +CHECK: references:
> +CHECK: kind: R_X86_64_JUMP_SLOT
> +
> CHECK: shared-library-atoms:
> CHECK: name: foo
> CHECK: load-name: shared.so-x86-64
>
> Modified: lld/trunk/test/elf/gotpcrel.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/gotpcrel.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/gotpcrel.test (original)
> +++ lld/trunk/test/elf/gotpcrel.test Fri Jan 30 20:05:01 2015
> @@ -3,20 +3,19 @@ RUN: lld -flavor gnu -target x86_64-linu
> RUN: --noinhibit-exec %p/Inputs/gotpcrel.x86-64 \
> RUN: | FileCheck %s -check-prefix=YAML
>
> -YAML: name: [[NULLGOT:[a-zA-Z0-9_]+]]
> -YAML: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
> -YAML-NOT: references:
> -
> -YAML: name: [[MAINGOT:[a-zA-Z0-9_]+]]
> -YAML: kind: R_X86_64_64
> -YAML: target: main
> -
> YAML: name: main
> YAML: references:
> YAML: kind: R_X86_64_GOTPCREL
> YAML: offset: 3
> -YAML: target: [[NULLGOT]]
> +YAML: target: [[NULLGOT:[a-zA-Z0-9_]+]]
> YAML: kind: R_X86_64_GOTPCREL
> YAML: offset: 10
> -YAML: target: [[MAINGOT]]
> +YAML: target: [[MAINGOT:[a-zA-Z0-9_]+]]
>
> +YAML: name: [[NULLGOT]]
> +YAML: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
> +YAML-NOT: references:
> +
> +YAML: name: [[MAINGOT]]
> +YAML: kind: R_X86_64_64
> +YAML: target: main
>
> Modified: lld/trunk/test/elf/hexagon-quickdata-sort.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/hexagon-quickdata-sort.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/hexagon-quickdata-sort.test (original)
> +++ lld/trunk/test/elf/hexagon-quickdata-sort.test Fri Jan 30 20:05:01 2015
> @@ -1,12 +1,12 @@
> RUN: lld -flavor gnu -target hexagon
> %p/Inputs/quickdata-sort-test.o.elf-hexagon -o %t1 --noinhibit-exec
> RUN: llvm-nm -n %t1 | FileCheck %s -check-prefix=quickdataSort
>
> -quickdataSort: 00002000 D AA1
> -quickdataSort: 00002001 D A1
> -quickdataSort: 00002002 D BB1
> -quickdataSort: 00002004 D B1
> -quickdataSort: 00002008 D CC1
> -quickdataSort: 0000200c D C1
> -quickdataSort: 00002010 D DD1
> -quickdataSort: 00002018 D D1
> +quickdataSort: 00002000 D A1
> +quickdataSort: 00002001 D AA1
> +quickdataSort: 00002002 D B1
> +quickdataSort: 00002004 D BB1
> +quickdataSort: 00002008 D C1
> +quickdataSort: 0000200c D CC1
> +quickdataSort: 00002010 D D1
> +quickdataSort: 00002018 D DD1
>
>
> Modified: lld/trunk/test/elf/hexagon-quickdata-sortcommon.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/hexagon-quickdata-sortcommon.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/hexagon-quickdata-sortcommon.test (original)
> +++ lld/trunk/test/elf/hexagon-quickdata-sortcommon.test Fri Jan 30
> 20:05:01 2015
> @@ -2,15 +2,15 @@ RUN: lld -flavor gnu -target hexagon -o
> RUN: %p/Inputs/quickdata-sortcommon-test.o.elf-hexagon
> RUN: llvm-nm -n %t1 | FileCheck %s -check-prefix=quickdataSortCommon
>
> -quickdataSortCommon: 00002000 D AA1
> -quickdataSortCommon: 00002001 D A1
> +quickdataSortCommon: 00002000 D A1
> +quickdataSortCommon: 00002001 D AA1
> quickdataSortCommon: 00002002 D AAA1
> -quickdataSortCommon: 00002004 D BB1
> -quickdataSortCommon: 00002006 D B1
> +quickdataSortCommon: 00002004 D B1
> +quickdataSortCommon: 00002006 D BB1
> quickdataSortCommon: 00002008 D BBB1
> -quickdataSortCommon: 0000200c D CC1
> -quickdataSortCommon: 00002010 D C1
> +quickdataSortCommon: 0000200c D C1
> +quickdataSortCommon: 00002010 D CC1
> quickdataSortCommon: 00002014 D CCC1
> -quickdataSortCommon: 00002018 D DD1
> -quickdataSortCommon: 00002020 D D1
> +quickdataSortCommon: 00002018 D D1
> +quickdataSortCommon: 00002020 D DD1
> quickdataSortCommon: 00002028 D DDD1
>
> Modified: lld/trunk/test/elf/ifunc.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/ifunc.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/ifunc.test (original)
> +++ lld/trunk/test/elf/ifunc.test Fri Jan 30 20:05:01 2015
> @@ -21,12 +21,6 @@ RUN: | FileCheck %s --check-prefix=SHARE
>
> PLT: defined-atoms:
>
> -// Make sure there's a got entry with a IRELATIVE relocation.
> -PLT: type: got
> -PLT: references:
> -PLT: kind: R_X86_64_IRELATIVE
> -PLT: target: hey
> -
> PLT: name: plt
> PLT: scope: global
> PLT: references:
> @@ -47,6 +41,12 @@ PLT: type: stub
> PLT: references
> PLT: kind: R_X86_64_PC32
>
> +// Make sure there's a got entry with a IRELATIVE relocation.
> +PLT: type: got
> +PLT: references:
> +PLT: kind: R_X86_64_IRELATIVE
> +PLT: target: hey
> +
> CHECK: name: hey
> CHECK: scope: global
> CHECK: type: resolver
>
> Modified: lld/trunk/test/elf/quickdata.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/quickdata.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/quickdata.test (original)
> +++ lld/trunk/test/elf/quickdata.test Fri Jan 30 20:05:01 2015
> @@ -1,14 +1,14 @@
> RUN: lld -flavor gnu -target hexagon --output-filetype=yaml
> %p/Inputs/quickdata-test.elf-hexagon \
> RUN: --noinhibit-exec | FileCheck %s -check-prefix hexagon
>
> -hexagon: - name: init
> -hexagon: scope: global
> -hexagon: type: quick-data
> hexagon: - name: ac1
> hexagon: scope: global
> hexagon: type: zero-fill-quick
> hexagon: size: 1
> hexagon: merge: as-tentative
> +hexagon: - name: init
> +hexagon: scope: global
> +hexagon: type: quick-data
> hexagon: - name: bss1
> hexagon: scope: global
> hexagon: type: zero-fill-quick
>
> Modified: lld/trunk/test/elf/tls.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/tls.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/tls.test (original)
> +++ lld/trunk/test/elf/tls.test Fri Jan 30 20:05:01 2015
> @@ -9,11 +9,6 @@ RUN: --noinhibit-exec -e main -static
>
> // Verify that the TLS accesses have the correct offsets.
>
> -YAML: type: got
> -YAML: references:
> -YAML: kind: R_X86_64_TPOFF64
> -YAML: target: tls2
> -
> YAML: name: main
> YAML: references:
> YAML: kind: R_X86_64_TPOFF32
> @@ -30,6 +25,10 @@ YAML: name: GOTTPOFF
> YAML: kind: R_X86_64_PC32
> YAML: target: [[GOTNAME:[a-zA-Z0-9_]+]]
>
> +YAML: type: got
> +YAML: references:
> +YAML: kind: R_X86_64_TPOFF64
> +YAML: target: tls2
>
> // main
> CHECK: addl %fs:-4
>
> Modified: lld/trunk/test/elf/x86-64-dynamic.test
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/x86-64-dynamic.test?rev=227666&r1=227665&r2=227666&view=diff
>
> ==============================================================================
> --- lld/trunk/test/elf/x86-64-dynamic.test (original)
> +++ lld/trunk/test/elf/x86-64-dynamic.test Fri Jan 30 20:05:01 2015
> @@ -8,17 +8,6 @@ RUN: lld -flavor gnu -target x86_64-linu
> RUN: %p/Inputs/shared.so-x86-64 --output-filetype=yaml --noinhibit-exec
> \
> RUN: | FileCheck %s --check-prefix=32S
>
> -// Don't check the GOT and PLT names as they are only present in assert
> builds.
> -CHECK: type: got
> -CHECK: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
> -CHECK: section-choice: custom-required
> -CHECK: section-name: .got.dyn
> -CHECK: permissions: rw-
> -CHECK: references:
> -CHECK: - kind: R_X86_64_GLOB_DAT
> -CHECK: offset: 0
> -CHECK: target: i
> -
> CHECK: - name: main
> CHECK: scope: global
> CHECK: references:
> @@ -67,7 +56,16 @@ CHECK: offset: 12
> target: .PLT0
> CHECK: addend: -4
>
> -
> +// Don't check the GOT and PLT names as they are only present in assert
> builds.
> +CHECK: type: got
> +CHECK: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]
> +CHECK: section-choice: custom-required
> +CHECK: section-name: .got.dyn
> +CHECK: permissions: rw-
> +CHECK: references:
> +CHECK: - kind: R_X86_64_GLOB_DAT
> +CHECK: offset: 0
> +CHECK: target: i
>
> CHECK:shared-library-atoms:
> CHECK: - name: foo
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150131/70d67ea7/attachment.html>
More information about the llvm-commits
mailing list