<div dir="ltr">This patch seems to break IdataPass in COFF writer. The COFF writer creates atoms for DLL import table in the pass. Because the atoms created in the pass do not really belong to any input file, the linker uses MutableFile representing the linking result as a dummy value of the file for the atoms. It did work until this patch.<div>
<br></div><div>The MutableFile did not have input ordinal value, so it now fails with the assertion at include/lld/Core/File.h:72 checking _ordinal != UINT64_MAX in the layout pass.</div><div><br></div><div>I think there are many ways to fix this. One way would be to create another dummy input file and use it for the atoms created by the IdataPass. It should work, but I don't think that's a good way because the dummy file is really dummy and does not do anything useful. It feels like the restriction that atoms must have associated input files is too strict.</div>
<div><br></div><div>So I'd want to make _file field optional for the atom. What do you guys think?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 12, 2013 at 8:43 AM, Shankar Easwaran <span dir="ltr"><<a href="mailto:shankare@codeaurora.org" target="_blank">shankare@codeaurora.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: shankare<br>
Date: Thu Sep 12 10:43:09 2013<br>
New Revision: 190608<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=190608&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=190608&view=rev</a><br>
Log:<br>
[lld][LayoutPass] Order the atoms that are in the same chain<br>
<br>
We need to order atoms that exist in the same chain. This is to make sure that<br>
the command line order is preserved when we emit the atoms to the output file.<br>
<br>
Credits: BigCheese for finding the bug.<br>
<br>
Adds a test which otherwise would fail.<br>
<br>
Added:<br>
lld/trunk/test/elf/X86_64/Inputs/layoutpass/<br>
lld/trunk/test/elf/X86_64/Inputs/layoutpass/1.c<br>
lld/trunk/test/elf/X86_64/Inputs/layoutpass/1.o<br>
lld/trunk/test/elf/X86_64/Inputs/layoutpass/2.c<br>
lld/trunk/test/elf/X86_64/Inputs/layoutpass/2.o<br>
lld/trunk/test/elf/X86_64/Inputs/layoutpass/3.c<br>
lld/trunk/test/elf/X86_64/Inputs/layoutpass/3.o<br>
lld/trunk/test/elf/X86_64/Inputs/layoutpass/lib2.a<br>
lld/trunk/test/elf/X86_64/layoutpass-order.test<br>
Modified:<br>
lld/trunk/lib/Passes/LayoutPass.cpp<br>
lld/trunk/test/elf/Hexagon/dynlib-gotoff.test<br>
lld/trunk/test/elf/X86_64/dontignorezerosize-sections.test<br>
lld/trunk/test/elf/X86_64/multi-weak-syms-order.test<br>
lld/trunk/test/elf/X86_64/nmagic.test<br>
lld/trunk/test/elf/X86_64/omagic.test<br>
lld/trunk/test/elf/X86_64/orderatoms-by-override.test<br>
lld/trunk/test/elf/X86_64/undef.test<br>
lld/trunk/test/elf/check.test<br>
lld/trunk/test/elf/checkrodata.test<br>
lld/trunk/test/elf/dynamic.test<br>
lld/trunk/test/elf/gotpcrel.test<br>
lld/trunk/test/elf/hexagon-quickdata-sort.test<br>
lld/trunk/test/elf/hexagon-quickdata-sortcommon.test<br>
lld/trunk/test/elf/ifunc.test<br>
lld/trunk/test/elf/quickdata.test<br>
lld/trunk/test/elf/tls.test<br>
lld/trunk/test/elf/x86-64-dynamic.test<br>
lld/trunk/test/pecoff/importlib.test<br>
<br>
Modified: lld/trunk/lib/Passes/LayoutPass.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Passes/LayoutPass.cpp?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Passes/LayoutPass.cpp?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/lib/Passes/LayoutPass.cpp (original)<br>
+++ lld/trunk/lib/Passes/LayoutPass.cpp Thu Sep 12 10:43:09 2013<br>
@@ -52,22 +52,15 @@ bool LayoutPass::CompareAtoms::operator(<br>
AtomToOrdinalT::const_iterator lPos = _layout._ordinalOverrideMap.find(left);<br>
AtomToOrdinalT::const_iterator rPos = _layout._ordinalOverrideMap.find(right);<br>
AtomToOrdinalT::const_iterator end = _layout._ordinalOverrideMap.end();<br>
- if (lPos != end) {<br>
- if (rPos != end) {<br>
- // both left and right are overridden, so compare overridden ordinals<br>
- if (lPos->second != rPos->second)<br>
- return lPos->second < rPos->second;<br>
- } else {<br>
- // left is overridden and right is not, so left < right<br>
- return true;<br>
- }<br>
- } else {<br>
- if (rPos != end) {<br>
- // right is overridden and left is not, so right < left<br>
- return false;<br>
- } else {<br>
- // neither are overridden,<br>
- // fall into default sorting below<br>
+<br>
+ // Sort atoms by their ordinal overrides only if they fall in the same<br>
+ // chain.<br>
+ const DefinedAtom *leftAtom = _layout._followOnRoots.find(left)->second;<br>
+ const DefinedAtom *rightAtom = _layout._followOnRoots.find(right)->second;<br>
+<br>
+ if (leftAtom == rightAtom) {<br>
+ if ((lPos != end) && (rPos != end)) {<br>
+ return lPos->second < rPos->second;<br>
}<br>
}<br>
<br>
@@ -91,8 +84,6 @@ bool LayoutPass::CompareAtoms::operator(<br>
if (leftType != rightType)<br>
return leftType < rightType;<br>
<br>
- // TO DO: Sort atoms in customs sections together.<br>
-<br>
// Sort by .o order.<br>
const File *leftFile = &left->file();<br>
const File *rightFile = &right->file();<br>
@@ -393,8 +384,6 @@ void LayoutPass::buildOrdinalOverrideMap<br>
_ordinalOverrideMap[nextAtom] = index++;<br>
}<br>
}<br>
- } else {<br>
- _ordinalOverrideMap[atom] = index++;<br>
}<br>
}<br>
}<br>
<br>
Modified: lld/trunk/test/elf/Hexagon/dynlib-gotoff.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Hexagon/dynlib-gotoff.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/Hexagon/dynlib-gotoff.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/Hexagon/dynlib-gotoff.test (original)<br>
+++ lld/trunk/test/elf/Hexagon/dynlib-gotoff.test Thu Sep 12 10:43:09 2013<br>
@@ -3,85 +3,72 @@ RUN: lld -flavor gnu -target hexagon %p/<br>
RUN: -o %t -emit-yaml -shared --noinhibit-exec<br>
RUN: FileCheck -check-prefix=CHECKGOTPLT %s < %t<br>
<br>
-CHECKGOTPLT: - ref-name: {{[0-9A-Z]+}}<br>
+ - name: __got0<br>
+CHECKGOTPLT: type: got<br>
+CHECKGOTPLT: content: [ 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,<br>
+CHECKGOTPLT: 00, 00, 00, 00 ]<br>
+CHECKGOTPLT: alignment: 2^3<br>
+CHECKGOTPLT: section-name: .got.plt<br>
+CHECKGOTPLT: permissions: rw-<br>
+ - name: __got_c<br>
+CHECKGOTPLT: type: got<br>
+CHECKGOTPLT: content: [ 00, 00, 00, 00 ]<br>
CHECKGOTPLT: alignment: 2^2<br>
-CHECKGOTPLT: section-name: .text<br>
+CHECKGOTPLT: section-name: .got<br>
+CHECKGOTPLT: permissions: rw-<br>
CHECKGOTPLT: references:<br>
-CHECKGOTPLT: - kind: layout-after<br>
+CHECKGOTPLT: - kind: R_HEX_GLOB_DAT<br>
CHECKGOTPLT: offset: 0<br>
-CHECKGOTPLT: target: fn2<br>
-CHECKGOTPLT: - name: fn2<br>
-CHECKGOTPLT: scope: global<br>
-CHECKGOTPLT: content: [ 00, C0, 9D, A0, 00, C0, 00, 78, 1E, C0, 1E, 96 ]<br>
+CHECKGOTPLT: target: c<br>
+ - name: __got_shankar<br>
+CHECKGOTPLT: type: got<br>
+CHECKGOTPLT: content: [ 00, 00, 00, 00 ]<br>
CHECKGOTPLT: alignment: 2^2<br>
-CHECKGOTPLT: section-name: .text<br>
-CHECKGOTPLT: - name: fn1<br>
-CHECKGOTPLT: scope: global<br>
-CHECKGOTPLT: content: [ 00, C0, 9D, A0, 00, C0, 00, 78, 1E, C0, 1E, 96 ]<br>
+CHECKGOTPLT: section-name: .got<br>
+CHECKGOTPLT: permissions: rw-<br>
+CHECKGOTPLT: references:<br>
+CHECKGOTPLT: - kind: R_HEX_GLOB_DAT<br>
+CHECKGOTPLT: offset: 0<br>
+CHECKGOTPLT: target: shankar<br>
+ - name: __got_fn<br>
+CHECKGOTPLT: type: got<br>
+CHECKGOTPLT: content: [ 00, 00, 00, 00 ]<br>
CHECKGOTPLT: alignment: 2^2<br>
-CHECKGOTPLT: section-name: .text<br>
-CHECKGOTPLT: - name: fn<br>
-CHECKGOTPLT: scope: global<br>
-CHECKGOTPLT: content: [ 01, C0, 9D, A0, 01, D8, 9D, A1, 00, 40, 00, 00,<br>
-CHECKGOTPLT: 18, C0, 49, 6A, 00, 40, 00, 00, 00, C0, 49, 6A,<br>
-CHECKGOTPLT: 0A, C0, 40, 3C, 00, 40, 00, 00, 00, C0, 49, 6A,<br>
-CHECKGOTPLT: 14, C0, 40, 3C, 00, 40, 00, 00, 00, C0, 98, 91,<br>
-CHECKGOTPLT: 0A, C0, 40, 3C, 00, 40, 00, 00, 00, C0, 98, 91,<br>
-CHECKGOTPLT: 14, C0, 40, 3C, 00, C0, 00, 78, 38, C0, 9D, 91,<br>
-CHECKGOTPLT: 1E, C0, 1E, 96 ]<br>
+CHECKGOTPLT: section-name: .got.plt<br>
+CHECKGOTPLT: permissions: rw-<br>
+CHECKGOTPLT: references:<br>
+CHECKGOTPLT: - kind: R_HEX_JMP_SLOT<br>
+CHECKGOTPLT: offset: 0<br>
+CHECKGOTPLT: target: fn<br>
+CHECKGOTPLT: - kind: R_HEX_32<br>
+CHECKGOTPLT: offset: 0<br>
+CHECKGOTPLT: target: .PLT0<br>
+ - name: __got_fn1<br>
+CHECKGOTPLT: type: got<br>
+CHECKGOTPLT: content: [ 00, 00, 00, 00 ]<br>
CHECKGOTPLT: alignment: 2^2<br>
-CHECKGOTPLT: section-name: .text<br>
+CHECKGOTPLT: section-name: .got.plt<br>
+CHECKGOTPLT: permissions: rw-<br>
CHECKGOTPLT: references:<br>
-CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X<br>
-CHECKGOTPLT: offset: 8<br>
-CHECKGOTPLT: target: _GLOBAL_OFFSET_TABLE_<br>
-CHECKGOTPLT: - kind: R_HEX_6_PCREL_X<br>
-CHECKGOTPLT: offset: 12<br>
-CHECKGOTPLT: target: _GLOBAL_OFFSET_TABLE_<br>
-CHECKGOTPLT: addend: 4<br>
-CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X<br>
-CHECKGOTPLT: offset: 16<br>
-CHECKGOTPLT: target: [[SBSS:[-a-zA-Z0-9_]+]]<br>
-CHECKGOTPLT: - kind: R_HEX_6_PCREL_X<br>
-CHECKGOTPLT: offset: 20<br>
-CHECKGOTPLT: target: [[SBSS]]<br>
-CHECKGOTPLT: addend: 4<br>
-CHECKGOTPLT: - kind: R_HEX_B32_PCREL_X<br>
-CHECKGOTPLT: offset: 28<br>
-CHECKGOTPLT: target: [[SBSS]]<br>
-CHECKGOTPLT: addend: 4<br>
-CHECKGOTPLT: - kind: R_HEX_6_PCREL_X<br>
-CHECKGOTPLT: offset: 32<br>
-CHECKGOTPLT: target: [[SBSS]]<br>
-CHECKGOTPLT: addend: 8<br>
-CHECKGOTPLT: - kind: R_HEX_GOT_32_6_X<br>
-CHECKGOTPLT: offset: 40<br>
- target: __got_c<br>
-CHECKGOTPLT: - kind: R_HEX_GOT_11_X<br>
-CHECKGOTPLT: offset: 44<br>
- target: __got_c<br>
-CHECKGOTPLT: - kind: R_HEX_GOT_32_6_X<br>
-CHECKGOTPLT: offset: 52<br>
- target: __got_shankar<br>
-CHECKGOTPLT: - kind: R_HEX_GOT_11_X<br>
-CHECKGOTPLT: offset: 56<br>
- target: __got_shankar<br>
-CHECKGOTPLT: - name: fn3<br>
-CHECKGOTPLT: scope: global<br>
-CHECKGOTPLT: content: [ 00, C0, 9D, A0, 00, C0, 00, 5A, 00, C0, 00, 5A,<br>
-CHECKGOTPLT: 00, C0, 00, 5A, 00, C0, 00, 78, 1E, C0, 1E, 96 ]<br>
+CHECKGOTPLT: - kind: R_HEX_JMP_SLOT<br>
+CHECKGOTPLT: offset: 0<br>
+CHECKGOTPLT: target: fn1<br>
+CHECKGOTPLT: - kind: R_HEX_32<br>
+CHECKGOTPLT: offset: 0<br>
+CHECKGOTPLT: target: .PLT0<br>
+ - name: __got_fn2<br>
+CHECKGOTPLT: type: got<br>
+CHECKGOTPLT: content: [ 00, 00, 00, 00 ]<br>
CHECKGOTPLT: alignment: 2^2<br>
-CHECKGOTPLT: section-name: .text<br>
+CHECKGOTPLT: section-name: .got.plt<br>
+CHECKGOTPLT: permissions: rw-<br>
CHECKGOTPLT: references:<br>
-CHECKGOTPLT: - kind: R_HEX_B22_PCREL<br>
-CHECKGOTPLT: offset: 4<br>
- target: __plt_fn<br>
-CHECKGOTPLT: - kind: R_HEX_B22_PCREL<br>
-CHECKGOTPLT: offset: 8<br>
- target: __plt_fn1<br>
-CHECKGOTPLT: - kind: R_HEX_B22_PCREL<br>
-CHECKGOTPLT: offset: 12<br>
- target: __plt_fn2<br>
+CHECKGOTPLT: - kind: R_HEX_JMP_SLOT<br>
+CHECKGOTPLT: offset: 0<br>
+CHECKGOTPLT: target: fn2<br>
+CHECKGOTPLT: - kind: R_HEX_32<br>
+CHECKGOTPLT: offset: 0<br>
+CHECKGOTPLT: target: .PLT0<br>
- name: .PLT0<br>
CHECKGOTPLT: type: stub<br>
CHECKGOTPLT: content: [ 00, 40, 00, 00, 1C, C0, 49, 6A, 0E, 42, 9C, E2,<br>
@@ -96,6 +83,7 @@ CHECKGOTPLT: offset: 0<br>
CHECKGOTPLT: - kind: R_HEX_6_PCREL_X<br>
CHECKGOTPLT: offset: 4<br>
target: __got0<br>
+CHECKGOTPLT: addend: 4<br>
- name: __plt_fn<br>
CHECKGOTPLT: type: stub<br>
CHECKGOTPLT: content: [ 00, 40, 00, 00, 0E, C0, 49, 6A, 1C, C0, 8E, 91,<br>
@@ -138,68 +126,3 @@ CHECKGOTPLT: - kind: R_H<br>
CHECKGOTPLT: offset: 4<br>
target: __got_fn2<br>
CHECKGOTPLT: addend: 4<br>
- - name: __got0<br>
-CHECKGOTPLT: type: got<br>
-CHECKGOTPLT: content: [ 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00,<br>
-CHECKGOTPLT: 00, 00, 00, 00 ]<br>
-CHECKGOTPLT: alignment: 2^3<br>
-CHECKGOTPLT: section-name: .got.plt<br>
- - name: __got_c<br>
-CHECKGOTPLT: type: got<br>
-CHECKGOTPLT: content: [ 00, 00, 00, 00 ]<br>
-CHECKGOTPLT: alignment: 2^2<br>
-CHECKGOTPLT: section-name: .got<br>
-CHECKGOTPLT: permissions: rw-<br>
-CHECKGOTPLT: references:<br>
-CHECKGOTPLT: - kind: R_HEX_GLOB_DAT<br>
-CHECKGOTPLT: offset: 0<br>
-CHECKGOTPLT: target: c<br>
- - name: __got_shankar<br>
-CHECKGOTPLT: type: got<br>
-CHECKGOTPLT: content: [ 00, 00, 00, 00 ]<br>
-CHECKGOTPLT: alignment: 2^2<br>
-CHECKGOTPLT: section-name: .got<br>
-CHECKGOTPLT: permissions: rw-<br>
-CHECKGOTPLT: references:<br>
-CHECKGOTPLT: - kind: R_HEX_GLOB_DAT<br>
-CHECKGOTPLT: offset: 0<br>
-CHECKGOTPLT: target: shankar<br>
- - name: __got_fn<br>
-CHECKGOTPLT: type: got<br>
-CHECKGOTPLT: content: [ 00, 00, 00, 00 ]<br>
-CHECKGOTPLT: alignment: 2^2<br>
-CHECKGOTPLT: section-name: .got.plt<br>
-CHECKGOTPLT: permissions: rw-<br>
-CHECKGOTPLT: references:<br>
-CHECKGOTPLT: - kind: R_HEX_JMP_SLOT<br>
-CHECKGOTPLT: offset: 0<br>
-CHECKGOTPLT: target: fn<br>
-CHECKGOTPLT: - kind: R_HEX_32<br>
-CHECKGOTPLT: offset: 0<br>
- target: .PLT0<br>
- - name: __got_fn1<br>
-CHECKGOTPLT: type: got<br>
-CHECKGOTPLT: content: [ 00, 00, 00, 00 ]<br>
-CHECKGOTPLT: alignment: 2^2<br>
-CHECKGOTPLT: section-name: .got.plt<br>
-CHECKGOTPLT: permissions: rw-<br>
-CHECKGOTPLT: references:<br>
-CHECKGOTPLT: - kind: R_HEX_JMP_SLOT<br>
-CHECKGOTPLT: offset: 0<br>
-CHECKGOTPLT: target: fn1<br>
-CHECKGOTPLT: - kind: R_HEX_32<br>
-CHECKGOTPLT: offset: 0<br>
- target: .PLT0<br>
- - name: __got_fn2<br>
-CHECKGOTPLT: type: got<br>
-CHECKGOTPLT: content: [ 00, 00, 00, 00 ]<br>
-CHECKGOTPLT: alignment: 2^2<br>
-CHECKGOTPLT: section-name: .got.plt<br>
-CHECKGOTPLT: permissions: rw-<br>
-CHECKGOTPLT: references:<br>
-CHECKGOTPLT: - kind: R_HEX_JMP_SLOT<br>
-CHECKGOTPLT: offset: 0<br>
-CHECKGOTPLT: target: fn2<br>
-CHECKGOTPLT: - kind: R_HEX_32<br>
-CHECKGOTPLT: offset: 0<br>
- target: .PLT0<br>
<br>
Added: lld/trunk/test/elf/X86_64/Inputs/layoutpass/1.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/Inputs/layoutpass/1.c?rev=190608&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/Inputs/layoutpass/1.c?rev=190608&view=auto</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/X86_64/Inputs/layoutpass/1.c (added)<br>
+++ lld/trunk/test/elf/X86_64/Inputs/layoutpass/1.c Thu Sep 12 10:43:09 2013<br>
@@ -0,0 +1,8 @@<br>
+int main() {<br>
+ a();<br>
+ return 0;<br>
+}<br>
+<br>
+int b() {<br>
+ return 0;<br>
+}<br>
<br>
Added: lld/trunk/test/elf/X86_64/Inputs/layoutpass/1.o<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/Inputs/layoutpass/1.o?rev=190608&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/Inputs/layoutpass/1.o?rev=190608&view=auto</a><br>
==============================================================================<br>
Binary files lld/trunk/test/elf/X86_64/Inputs/layoutpass/1.o (added) and lld/trunk/test/elf/X86_64/Inputs/layoutpass/1.o Thu Sep 12 10:43:09 2013 differ<br>
<br>
Added: lld/trunk/test/elf/X86_64/Inputs/layoutpass/2.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/Inputs/layoutpass/2.c?rev=190608&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/Inputs/layoutpass/2.c?rev=190608&view=auto</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/X86_64/Inputs/layoutpass/2.c (added)<br>
+++ lld/trunk/test/elf/X86_64/Inputs/layoutpass/2.c Thu Sep 12 10:43:09 2013<br>
@@ -0,0 +1,7 @@<br>
+int a() {<br>
+ return 0;<br>
+}<br>
+<br>
+int c() {<br>
+ return 0;<br>
+}<br>
<br>
Added: lld/trunk/test/elf/X86_64/Inputs/layoutpass/2.o<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/Inputs/layoutpass/2.o?rev=190608&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/Inputs/layoutpass/2.o?rev=190608&view=auto</a><br>
==============================================================================<br>
Binary files lld/trunk/test/elf/X86_64/Inputs/layoutpass/2.o (added) and lld/trunk/test/elf/X86_64/Inputs/layoutpass/2.o Thu Sep 12 10:43:09 2013 differ<br>
<br>
Added: lld/trunk/test/elf/X86_64/Inputs/layoutpass/3.c<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/Inputs/layoutpass/3.c?rev=190608&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/Inputs/layoutpass/3.c?rev=190608&view=auto</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/X86_64/Inputs/layoutpass/3.c (added)<br>
+++ lld/trunk/test/elf/X86_64/Inputs/layoutpass/3.c Thu Sep 12 10:43:09 2013<br>
@@ -0,0 +1,3 @@<br>
+int d() {<br>
+ return 0;<br>
+}<br>
<br>
Added: lld/trunk/test/elf/X86_64/Inputs/layoutpass/3.o<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/Inputs/layoutpass/3.o?rev=190608&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/Inputs/layoutpass/3.o?rev=190608&view=auto</a><br>
==============================================================================<br>
Binary files lld/trunk/test/elf/X86_64/Inputs/layoutpass/3.o (added) and lld/trunk/test/elf/X86_64/Inputs/layoutpass/3.o Thu Sep 12 10:43:09 2013 differ<br>
<br>
Added: lld/trunk/test/elf/X86_64/Inputs/layoutpass/lib2.a<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/Inputs/layoutpass/lib2.a?rev=190608&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/Inputs/layoutpass/lib2.a?rev=190608&view=auto</a><br>
==============================================================================<br>
Binary files lld/trunk/test/elf/X86_64/Inputs/layoutpass/lib2.a (added) and lld/trunk/test/elf/X86_64/Inputs/layoutpass/lib2.a Thu Sep 12 10:43:09 2013 differ<br>
<br>
Modified: lld/trunk/test/elf/X86_64/dontignorezerosize-sections.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/dontignorezerosize-sections.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/dontignorezerosize-sections.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/X86_64/dontignorezerosize-sections.test (original)<br>
+++ lld/trunk/test/elf/X86_64/dontignorezerosize-sections.test Thu Sep 12 10:43:09 2013<br>
@@ -3,9 +3,9 @@ RUN: lld -flavor gnu -target x86_64-linu<br>
RUN: --noinhibit-exec -emit-yaml -o %t<br>
RUN: FileCheck %s < %t<br>
<br>
-CHECK: section-name: .text<br>
CHECK: section-name: .data<br>
CHECK: references:<br>
CHECK: - kind: R_X86_64_16<br>
CHECK: offset: 0<br>
CHECK: target: L000<br>
+CHECK: section-name: .text<br>
<br>
Added: lld/trunk/test/elf/X86_64/layoutpass-order.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/layoutpass-order.test?rev=190608&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/layoutpass-order.test?rev=190608&view=auto</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/X86_64/layoutpass-order.test (added)<br>
+++ lld/trunk/test/elf/X86_64/layoutpass-order.test Thu Sep 12 10:43:09 2013<br>
@@ -0,0 +1,14 @@<br>
+# This test checks that we follow the command line order of layouting<br>
+# symbols in the output file<br>
+<br>
+RUN: lld -flavor gnu -target x86_64 %p/Inputs/layoutpass/1.o \<br>
+RUN: %p/Inputs/layoutpass/lib2.a %p/Inputs/layoutpass/3.o -o %t \<br>
+RUN: --noinhibit-exec -static<br>
+<br>
+RUN: llvm-nm -n %t | FileCheck -check-prefix=SYMBOLSORDER %s<br>
+<br>
+SYMBOLSORDER: 004000b0 T main<br>
+SYMBOLSORDER: 004000c5 T b<br>
+SYMBOLSORDER: 004000d0 T a<br>
+SYMBOLSORDER: 004000db T c<br>
+SYMBOLSORDER: 004000e8 T d<br>
<br>
Modified: lld/trunk/test/elf/X86_64/multi-weak-syms-order.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/multi-weak-syms-order.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/multi-weak-syms-order.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/X86_64/multi-weak-syms-order.test (original)<br>
+++ lld/trunk/test/elf/X86_64/multi-weak-syms-order.test Thu Sep 12 10:43:09 2013<br>
@@ -10,8 +10,4 @@ WEAKORDER: {{[0-9a-f]+}} T g<br>
WEAKORDER: {{[0-9a-f]+}} T main<br>
<br>
WEAKATOMSORDER: - name: f<br>
-WEAKATOMSORDER: - ref-name: {{[A-Z0-9]+}}<br>
WEAKATOMSORDER: - name: g<br>
-WEAKATOMSORDER: - ref-name: {{[A-Z0-9]+}}<br>
-<br>
-<br>
<br>
Modified: lld/trunk/test/elf/X86_64/nmagic.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/nmagic.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/nmagic.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/X86_64/nmagic.test (original)<br>
+++ lld/trunk/test/elf/X86_64/nmagic.test Thu Sep 12 10:43:09 2013<br>
@@ -6,207 +6,71 @@ RUN: --noinhibit-exec -o %t --nmagic -st<br>
RUN: llvm-readobj -sections %t | FileCheck -check-prefix=NMAGICSECTIONS %s<br>
RUN: llvm-readobj -program-headers %t | FileCheck -check-prefix=NMAGICPROGRAMHEADERS %s<br>
<br>
-NMAGICSECTIONS: Sections [<br>
NMAGICSECTIONS: Section {<br>
NMAGICSECTIONS: Index: 0<br>
NMAGICSECTIONS: Name: (0)<br>
NMAGICSECTIONS: Type: SHT_NULL (0x0)<br>
-NMAGICSECTIONS: Flags [ (0x0)<br>
-NMAGICSECTIONS: ]<br>
-NMAGICSECTIONS: Address: 0x0<br>
-NMAGICSECTIONS: Offset: 0x0<br>
-NMAGICSECTIONS: Size: 0<br>
-NMAGICSECTIONS: Link: 0<br>
-NMAGICSECTIONS: Info: 0<br>
-NMAGICSECTIONS: AddressAlignment: 0<br>
-NMAGICSECTIONS: EntrySize: 0<br>
NMAGICSECTIONS: }<br>
NMAGICSECTIONS: Section {<br>
NMAGICSECTIONS: Index: 1<br>
-NMAGICSECTIONS: Name: .text (1)<br>
+NMAGICSECTIONS: Name: .note.GNU-stack (1)<br>
NMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
-NMAGICSECTIONS: Flags [ (0x6)<br>
-NMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-NMAGICSECTIONS: SHF_EXECINSTR (0x4)<br>
-NMAGICSECTIONS: ]<br>
-NMAGICSECTIONS: Address: 0x4000B0<br>
-NMAGICSECTIONS: Offset: 0xB0<br>
-NMAGICSECTIONS: Size: 11<br>
-NMAGICSECTIONS: Link: 0<br>
-NMAGICSECTIONS: Info: 0<br>
-NMAGICSECTIONS: AddressAlignment: 4<br>
-NMAGICSECTIONS: EntrySize: 0<br>
NMAGICSECTIONS: }<br>
NMAGICSECTIONS: Section {<br>
NMAGICSECTIONS: Index: 2<br>
-NMAGICSECTIONS: Name: .note.GNU-stack (7)<br>
+NMAGICSECTIONS: Name: .text (17)<br>
NMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
-NMAGICSECTIONS: Flags [ (0x2)<br>
-NMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-NMAGICSECTIONS: ]<br>
-NMAGICSECTIONS: Address: 0x4000BB<br>
-NMAGICSECTIONS: Offset: 0xBB<br>
-NMAGICSECTIONS: Size: 0<br>
-NMAGICSECTIONS: Link: 0<br>
-NMAGICSECTIONS: Info: 0<br>
-NMAGICSECTIONS: AddressAlignment: 1<br>
-NMAGICSECTIONS: EntrySize: 0<br>
NMAGICSECTIONS: }<br>
NMAGICSECTIONS: Section {<br>
NMAGICSECTIONS: Index: 3<br>
NMAGICSECTIONS: Name: .comment (23)<br>
NMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
-NMAGICSECTIONS: Flags [ (0x2)<br>
-NMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-NMAGICSECTIONS: ]<br>
-NMAGICSECTIONS: Address: 0x4000BB<br>
-NMAGICSECTIONS: Offset: 0xBB<br>
-NMAGICSECTIONS: Size: 43<br>
-NMAGICSECTIONS: Link: 0<br>
-NMAGICSECTIONS: Info: 0<br>
-NMAGICSECTIONS: AddressAlignment: 1<br>
-NMAGICSECTIONS: EntrySize: 0<br>
NMAGICSECTIONS: }<br>
NMAGICSECTIONS: Section {<br>
NMAGICSECTIONS: Index: 4<br>
NMAGICSECTIONS: Name: .eh_frame (32)<br>
NMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
-NMAGICSECTIONS: Flags [ (0x2)<br>
-NMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-NMAGICSECTIONS: ]<br>
-NMAGICSECTIONS: Address: 0x4000E8<br>
-NMAGICSECTIONS: Offset: 0xE8<br>
-NMAGICSECTIONS: Size: 56<br>
-NMAGICSECTIONS: Link: 0<br>
-NMAGICSECTIONS: Info: 0<br>
-NMAGICSECTIONS: AddressAlignment: 8<br>
-NMAGICSECTIONS: EntrySize: 0<br>
NMAGICSECTIONS: }<br>
NMAGICSECTIONS: Section {<br>
NMAGICSECTIONS: Index: 5<br>
NMAGICSECTIONS: Name: .tdata (42)<br>
NMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
-NMAGICSECTIONS: Flags [ (0x403)<br>
-NMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-NMAGICSECTIONS: SHF_TLS (0x400)<br>
-NMAGICSECTIONS: SHF_WRITE (0x1)<br>
-NMAGICSECTIONS: ]<br>
-NMAGICSECTIONS: Address: 0x401000<br>
-NMAGICSECTIONS: Offset: 0x1000<br>
-NMAGICSECTIONS: Size: 4<br>
-NMAGICSECTIONS: Link: 0<br>
-NMAGICSECTIONS: Info: 0<br>
-NMAGICSECTIONS: AddressAlignment: 4<br>
-NMAGICSECTIONS: EntrySize: 0<br>
NMAGICSECTIONS: }<br>
NMAGICSECTIONS: Section {<br>
NMAGICSECTIONS: Index: 6<br>
NMAGICSECTIONS: Name: .tbss (49)<br>
NMAGICSECTIONS: Type: SHT_NOBITS (0x8)<br>
-NMAGICSECTIONS: Flags [ (0x403)<br>
-NMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-NMAGICSECTIONS: SHF_TLS (0x400)<br>
-NMAGICSECTIONS: SHF_WRITE (0x1)<br>
-NMAGICSECTIONS: ]<br>
-NMAGICSECTIONS: Address: 0x401004<br>
-NMAGICSECTIONS: Offset: 0x1004<br>
-NMAGICSECTIONS: Size: 8<br>
-NMAGICSECTIONS: Link: 0<br>
-NMAGICSECTIONS: Info: 0<br>
-NMAGICSECTIONS: AddressAlignment: 4<br>
-NMAGICSECTIONS: EntrySize: 0<br>
NMAGICSECTIONS: }<br>
NMAGICSECTIONS: Section {<br>
NMAGICSECTIONS: Index: 7<br>
NMAGICSECTIONS: Name: .got.plt (55)<br>
NMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
-NMAGICSECTIONS: Flags [ (0x3)<br>
-NMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-NMAGICSECTIONS: SHF_WRITE (0x1)<br>
-NMAGICSECTIONS: ]<br>
-NMAGICSECTIONS: Address: 0x401008<br>
-NMAGICSECTIONS: Offset: 0x1008<br>
-NMAGICSECTIONS: Size: 0<br>
-NMAGICSECTIONS: Link: 0<br>
-NMAGICSECTIONS: Info: 0<br>
-NMAGICSECTIONS: AddressAlignment: 8<br>
-NMAGICSECTIONS: EntrySize: 0<br>
NMAGICSECTIONS: }<br>
NMAGICSECTIONS: Section {<br>
NMAGICSECTIONS: Index: 8<br>
NMAGICSECTIONS: Name: .data (64)<br>
NMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
-NMAGICSECTIONS: Flags [ (0x3)<br>
-NMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-NMAGICSECTIONS: SHF_WRITE (0x1)<br>
-NMAGICSECTIONS: ]<br>
-NMAGICSECTIONS: Address: 0x401008<br>
-NMAGICSECTIONS: Offset: 0x1008<br>
-NMAGICSECTIONS: Size: 4<br>
-NMAGICSECTIONS: Link: 0<br>
-NMAGICSECTIONS: Info: 0<br>
-NMAGICSECTIONS: AddressAlignment: 4<br>
-NMAGICSECTIONS: EntrySize: 0<br>
NMAGICSECTIONS: }<br>
NMAGICSECTIONS: Section {<br>
NMAGICSECTIONS: Index: 9<br>
NMAGICSECTIONS: Name: .bss (70)<br>
NMAGICSECTIONS: Type: SHT_NOBITS (0x8)<br>
-NMAGICSECTIONS: Flags [ (0x3)<br>
-NMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-NMAGICSECTIONS: SHF_WRITE (0x1)<br>
-NMAGICSECTIONS: ]<br>
-NMAGICSECTIONS: Address: 0x40100C<br>
-NMAGICSECTIONS: Offset: 0x100C<br>
-NMAGICSECTIONS: Size: 0<br>
-NMAGICSECTIONS: Link: 0<br>
-NMAGICSECTIONS: Info: 0<br>
-NMAGICSECTIONS: AddressAlignment: 4<br>
-NMAGICSECTIONS: EntrySize: 0<br>
NMAGICSECTIONS: }<br>
NMAGICSECTIONS: Section {<br>
NMAGICSECTIONS: Index: 10<br>
NMAGICSECTIONS: Name: .shstrtab (75)<br>
NMAGICSECTIONS: Type: SHT_STRTAB (0x3)<br>
-NMAGICSECTIONS: Flags [ (0x0)<br>
-NMAGICSECTIONS: ]<br>
-NMAGICSECTIONS: Address: 0x0<br>
-NMAGICSECTIONS: Offset: 0x100C<br>
-NMAGICSECTIONS: Size: 101<br>
-NMAGICSECTIONS: Link: 0<br>
-NMAGICSECTIONS: Info: 0<br>
-NMAGICSECTIONS: AddressAlignment: 1<br>
-NMAGICSECTIONS: EntrySize: 0<br>
NMAGICSECTIONS: }<br>
NMAGICSECTIONS: Section {<br>
NMAGICSECTIONS: Index: 11<br>
NMAGICSECTIONS: Name: .symtab (85)<br>
NMAGICSECTIONS: Type: SHT_SYMTAB (0x2)<br>
-NMAGICSECTIONS: Flags [ (0x0)<br>
-NMAGICSECTIONS: ]<br>
-NMAGICSECTIONS: Address: 0x0<br>
-NMAGICSECTIONS: Offset: 0x1078<br>
-NMAGICSECTIONS: Size: 528<br>
-NMAGICSECTIONS: Link: 12<br>
-NMAGICSECTIONS: Info: 2<br>
-NMAGICSECTIONS: AddressAlignment: 8<br>
-NMAGICSECTIONS: EntrySize: 24<br>
NMAGICSECTIONS: }<br>
NMAGICSECTIONS: Section {<br>
NMAGICSECTIONS: Index: 12<br>
NMAGICSECTIONS: Name: .strtab (93)<br>
NMAGICSECTIONS: Type: SHT_STRTAB (0x3)<br>
-NMAGICSECTIONS: Flags [ (0x0)<br>
-NMAGICSECTIONS: ]<br>
-NMAGICSECTIONS: Address: 0x0<br>
-NMAGICSECTIONS: Offset: 0x1288<br>
-NMAGICSECTIONS: Size: 246<br>
-NMAGICSECTIONS: Link: 0<br>
-NMAGICSECTIONS: Info: 0<br>
-NMAGICSECTIONS: AddressAlignment: 1<br>
-NMAGICSECTIONS: EntrySize: 0<br>
NMAGICSECTIONS: }<br>
-NMAGICSECTIONS: ]<br>
<br>
NMAGICPROGRAMHEADERS: ProgramHeaders [<br>
NMAGICPROGRAMHEADERS: ProgramHeader {<br>
<br>
Modified: lld/trunk/test/elf/X86_64/omagic.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/omagic.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/omagic.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/X86_64/omagic.test (original)<br>
+++ lld/trunk/test/elf/X86_64/omagic.test Thu Sep 12 10:43:09 2013<br>
@@ -6,207 +6,205 @@ RUN: --noinhibit-exec -o %t --omagic -st<br>
RUN: llvm-readobj -sections %t | FileCheck -check-prefix=OMAGICSECTIONS %s<br>
RUN: llvm-readobj -program-headers %t | FileCheck -check-prefix=OMAGICPROGRAMHEADERS %s<br>
<br>
-OMAGICSECTIONS: Sections [<br>
-OMAGICSECTIONS: Section {<br>
-OMAGICSECTIONS: Index: 0<br>
-OMAGICSECTIONS: Name: (0)<br>
-OMAGICSECTIONS: Type: SHT_NULL (0x0)<br>
-OMAGICSECTIONS: Flags [ (0x0)<br>
-OMAGICSECTIONS: ]<br>
-OMAGICSECTIONS: Address: 0x0<br>
-OMAGICSECTIONS: Offset: 0x0<br>
-OMAGICSECTIONS: Size: 0<br>
-OMAGICSECTIONS: Link: 0<br>
-OMAGICSECTIONS: Info: 0<br>
-OMAGICSECTIONS: AddressAlignment: 0<br>
-OMAGICSECTIONS: EntrySize: 0<br>
-OMAGICSECTIONS: }<br>
-OMAGICSECTIONS: Section {<br>
-OMAGICSECTIONS: Index: 1<br>
-OMAGICSECTIONS: Name: .text (1)<br>
-OMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
-OMAGICSECTIONS: Flags [ (0x6)<br>
-OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-OMAGICSECTIONS: SHF_EXECINSTR (0x4)<br>
-OMAGICSECTIONS: ]<br>
-OMAGICSECTIONS: Address: 0x4000B0<br>
-OMAGICSECTIONS: Offset: 0xB0<br>
-OMAGICSECTIONS: Size: 11<br>
-OMAGICSECTIONS: Link: 0<br>
-OMAGICSECTIONS: Info: 0<br>
-OMAGICSECTIONS: AddressAlignment: 4<br>
-OMAGICSECTIONS: EntrySize: 0<br>
-OMAGICSECTIONS: }<br>
-OMAGICSECTIONS: Section {<br>
-OMAGICSECTIONS: Index: 2<br>
-OMAGICSECTIONS: Name: .note.GNU-stack (7)<br>
-OMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
-OMAGICSECTIONS: Flags [ (0x2)<br>
-OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-OMAGICSECTIONS: ]<br>
-OMAGICSECTIONS: Address: 0x4000BB<br>
-OMAGICSECTIONS: Offset: 0xBB<br>
-OMAGICSECTIONS: Size: 0<br>
-OMAGICSECTIONS: Link: 0<br>
-OMAGICSECTIONS: Info: 0<br>
-OMAGICSECTIONS: AddressAlignment: 1<br>
-OMAGICSECTIONS: EntrySize: 0<br>
-OMAGICSECTIONS: }<br>
-OMAGICSECTIONS: Section {<br>
-OMAGICSECTIONS: Index: 3<br>
-OMAGICSECTIONS: Name: .comment (23)<br>
-OMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
-OMAGICSECTIONS: Flags [ (0x2)<br>
-OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-OMAGICSECTIONS: ]<br>
-OMAGICSECTIONS: Address: 0x4000BB<br>
-OMAGICSECTIONS: Offset: 0xBB<br>
-OMAGICSECTIONS: Size: 43<br>
-OMAGICSECTIONS: Link: 0<br>
-OMAGICSECTIONS: Info: 0<br>
-OMAGICSECTIONS: AddressAlignment: 1<br>
-OMAGICSECTIONS: EntrySize: 0<br>
-OMAGICSECTIONS: }<br>
-OMAGICSECTIONS: Section {<br>
-OMAGICSECTIONS: Index: 4<br>
-OMAGICSECTIONS: Name: .eh_frame (32)<br>
-OMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
-OMAGICSECTIONS: Flags [ (0x2)<br>
-OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-OMAGICSECTIONS: ]<br>
-OMAGICSECTIONS: Address: 0x4000E8<br>
-OMAGICSECTIONS: Offset: 0xE8<br>
-OMAGICSECTIONS: Size: 56<br>
-OMAGICSECTIONS: Link: 0<br>
-OMAGICSECTIONS: Info: 0<br>
-OMAGICSECTIONS: AddressAlignment: 8<br>
-OMAGICSECTIONS: EntrySize: 0<br>
-OMAGICSECTIONS: }<br>
-OMAGICSECTIONS: Section {<br>
-OMAGICSECTIONS: Index: 5<br>
-OMAGICSECTIONS: Name: .tdata (42)<br>
-OMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
-OMAGICSECTIONS: Flags [ (0x403)<br>
-OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-OMAGICSECTIONS: SHF_TLS (0x400)<br>
-OMAGICSECTIONS: SHF_WRITE (0x1)<br>
-OMAGICSECTIONS: ]<br>
-OMAGICSECTIONS: Address: 0x400120<br>
-OMAGICSECTIONS: Offset: 0x120<br>
-OMAGICSECTIONS: Size: 4<br>
-OMAGICSECTIONS: Link: 0<br>
-OMAGICSECTIONS: Info: 0<br>
-OMAGICSECTIONS: AddressAlignment: 4<br>
-OMAGICSECTIONS: EntrySize: 0<br>
-OMAGICSECTIONS: }<br>
-OMAGICSECTIONS: Section {<br>
-OMAGICSECTIONS: Index: 6<br>
-OMAGICSECTIONS: Name: .tbss (49)<br>
-OMAGICSECTIONS: Type: SHT_NOBITS (0x8)<br>
-OMAGICSECTIONS: Flags [ (0x403)<br>
-OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-OMAGICSECTIONS: SHF_TLS (0x400)<br>
-OMAGICSECTIONS: SHF_WRITE (0x1)<br>
-OMAGICSECTIONS: ]<br>
-OMAGICSECTIONS: Address: 0x400124<br>
-OMAGICSECTIONS: Offset: 0x124<br>
-OMAGICSECTIONS: Size: 8<br>
-OMAGICSECTIONS: Link: 0<br>
-OMAGICSECTIONS: Info: 0<br>
-OMAGICSECTIONS: AddressAlignment: 4<br>
-OMAGICSECTIONS: EntrySize: 0<br>
-OMAGICSECTIONS: }<br>
-OMAGICSECTIONS: Section {<br>
-OMAGICSECTIONS: Index: 7<br>
-OMAGICSECTIONS: Name: .got.plt (55)<br>
-OMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
-OMAGICSECTIONS: Flags [ (0x3)<br>
-OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-OMAGICSECTIONS: SHF_WRITE (0x1)<br>
-OMAGICSECTIONS: ]<br>
-OMAGICSECTIONS: Address: 0x400128<br>
-OMAGICSECTIONS: Offset: 0x128<br>
-OMAGICSECTIONS: Size: 0<br>
-OMAGICSECTIONS: Link: 0<br>
-OMAGICSECTIONS: Info: 0<br>
-OMAGICSECTIONS: AddressAlignment: 8<br>
-OMAGICSECTIONS: EntrySize: 0<br>
-OMAGICSECTIONS: }<br>
-OMAGICSECTIONS: Section {<br>
-OMAGICSECTIONS: Index: 8<br>
-OMAGICSECTIONS: Name: .data (64)<br>
-OMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
-OMAGICSECTIONS: Flags [ (0x3)<br>
-OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-OMAGICSECTIONS: SHF_WRITE (0x1)<br>
-OMAGICSECTIONS: ]<br>
-OMAGICSECTIONS: Address: 0x400128<br>
-OMAGICSECTIONS: Offset: 0x128<br>
-OMAGICSECTIONS: Size: 4<br>
-OMAGICSECTIONS: Link: 0<br>
-OMAGICSECTIONS: Info: 0<br>
-OMAGICSECTIONS: AddressAlignment: 4<br>
-OMAGICSECTIONS: EntrySize: 0<br>
-OMAGICSECTIONS: }<br>
-OMAGICSECTIONS: Section {<br>
-OMAGICSECTIONS: Index: 9<br>
-OMAGICSECTIONS: Name: .bss (70)<br>
-OMAGICSECTIONS: Type: SHT_NOBITS (0x8)<br>
-OMAGICSECTIONS: Flags [ (0x3)<br>
-OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
-OMAGICSECTIONS: SHF_WRITE (0x1)<br>
-OMAGICSECTIONS: ]<br>
-OMAGICSECTIONS: Address: 0x40012C<br>
-OMAGICSECTIONS: Offset: 0x12C<br>
-OMAGICSECTIONS: Size: 0<br>
-OMAGICSECTIONS: Link: 0<br>
-OMAGICSECTIONS: Info: 0<br>
-OMAGICSECTIONS: AddressAlignment: 4<br>
-OMAGICSECTIONS: EntrySize: 0<br>
-OMAGICSECTIONS: }<br>
-OMAGICSECTIONS: Section {<br>
-OMAGICSECTIONS: Index: 10<br>
-OMAGICSECTIONS: Name: .shstrtab (75)<br>
-OMAGICSECTIONS: Type: SHT_STRTAB (0x3)<br>
-OMAGICSECTIONS: Flags [ (0x0)<br>
-OMAGICSECTIONS: ]<br>
-OMAGICSECTIONS: Address: 0x0<br>
-OMAGICSECTIONS: Offset: 0x12C<br>
-OMAGICSECTIONS: Size: 101<br>
-OMAGICSECTIONS: Link: 0<br>
-OMAGICSECTIONS: Info: 0<br>
-OMAGICSECTIONS: AddressAlignment: 1<br>
-OMAGICSECTIONS: EntrySize: 0<br>
-OMAGICSECTIONS: }<br>
-OMAGICSECTIONS: Section {<br>
-OMAGICSECTIONS: Index: 11<br>
-OMAGICSECTIONS: Name: .symtab (85)<br>
-OMAGICSECTIONS: Type: SHT_SYMTAB (0x2)<br>
-OMAGICSECTIONS: Flags [ (0x0)<br>
-OMAGICSECTIONS: ]<br>
-OMAGICSECTIONS: Address: 0x0<br>
-OMAGICSECTIONS: Offset: 0x198<br>
-OMAGICSECTIONS: Size: 528<br>
-OMAGICSECTIONS: Link: 12<br>
-OMAGICSECTIONS: Info: 2<br>
-OMAGICSECTIONS: AddressAlignment: 8<br>
-OMAGICSECTIONS: EntrySize: 24<br>
-OMAGICSECTIONS: }<br>
-OMAGICSECTIONS: Section {<br>
-OMAGICSECTIONS: Index: 12<br>
-OMAGICSECTIONS: Name: .strtab (93)<br>
-OMAGICSECTIONS: Type: SHT_STRTAB (0x3)<br>
-OMAGICSECTIONS: Flags [ (0x0)<br>
-OMAGICSECTIONS: ]<br>
-OMAGICSECTIONS: Address: 0x0<br>
-OMAGICSECTIONS: Offset: 0x3A8<br>
-OMAGICSECTIONS: Size: 246<br>
-OMAGICSECTIONS: Link: 0<br>
-OMAGICSECTIONS: Info: 0<br>
-OMAGICSECTIONS: AddressAlignment: 1<br>
-OMAGICSECTIONS: EntrySize: 0<br>
-OMAGICSECTIONS: }<br>
-OMAGICSECTIONS: ]<br>
+OMAGICSECTIONS: Section {<br>
+OMAGICSECTIONS: Index: 0<br>
+OMAGICSECTIONS: Name: (0)<br>
+OMAGICSECTIONS: Type: SHT_NULL (0x0)<br>
+OMAGICSECTIONS: Flags [ (0x0)<br>
+OMAGICSECTIONS: ]<br>
+OMAGICSECTIONS: Address: 0x0<br>
+OMAGICSECTIONS: Offset: 0x0<br>
+OMAGICSECTIONS: Size: 0<br>
+OMAGICSECTIONS: Link: 0<br>
+OMAGICSECTIONS: Info: 0<br>
+OMAGICSECTIONS: AddressAlignment: 0<br>
+OMAGICSECTIONS: EntrySize: 0<br>
+OMAGICSECTIONS: }<br>
+OMAGICSECTIONS: Section {<br>
+OMAGICSECTIONS: Index: 1<br>
+OMAGICSECTIONS: Name: .note.GNU-stack (1)<br>
+OMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
+OMAGICSECTIONS: Flags [ (0x2)<br>
+OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
+OMAGICSECTIONS: ]<br>
+OMAGICSECTIONS: Address: 0x4000B0<br>
+OMAGICSECTIONS: Offset: 0xB0<br>
+OMAGICSECTIONS: Size: 0<br>
+OMAGICSECTIONS: Link: 0<br>
+OMAGICSECTIONS: Info: 0<br>
+OMAGICSECTIONS: AddressAlignment: 1<br>
+OMAGICSECTIONS: EntrySize: 0<br>
+OMAGICSECTIONS: }<br>
+OMAGICSECTIONS: Section {<br>
+OMAGICSECTIONS: Index: 2<br>
+OMAGICSECTIONS: Name: .text (17)<br>
+OMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
+OMAGICSECTIONS: Flags [ (0x6)<br>
+OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
+OMAGICSECTIONS: SHF_EXECINSTR (0x4)<br>
+OMAGICSECTIONS: ]<br>
+OMAGICSECTIONS: Address: 0x4000B0<br>
+OMAGICSECTIONS: Offset: 0xB0<br>
+OMAGICSECTIONS: Size: 11<br>
+OMAGICSECTIONS: Link: 0<br>
+OMAGICSECTIONS: Info: 0<br>
+OMAGICSECTIONS: AddressAlignment: 4<br>
+OMAGICSECTIONS: EntrySize: 0<br>
+OMAGICSECTIONS: }<br>
+OMAGICSECTIONS: Section {<br>
+OMAGICSECTIONS: Index: 3<br>
+OMAGICSECTIONS: Name: .comment (23)<br>
+OMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
+OMAGICSECTIONS: Flags [ (0x2)<br>
+OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
+OMAGICSECTIONS: ]<br>
+OMAGICSECTIONS: Address: 0x4000BB<br>
+OMAGICSECTIONS: Offset: 0xBB<br>
+OMAGICSECTIONS: Size: 43<br>
+OMAGICSECTIONS: Link: 0<br>
+OMAGICSECTIONS: Info: 0<br>
+OMAGICSECTIONS: AddressAlignment: 1<br>
+OMAGICSECTIONS: EntrySize: 0<br>
+OMAGICSECTIONS: }<br>
+OMAGICSECTIONS: Section {<br>
+OMAGICSECTIONS: Index: 4<br>
+OMAGICSECTIONS: Name: .eh_frame (32)<br>
+OMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
+OMAGICSECTIONS: Flags [ (0x2)<br>
+OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
+OMAGICSECTIONS: ]<br>
+OMAGICSECTIONS: Address: 0x4000E8<br>
+OMAGICSECTIONS: Offset: 0xE8<br>
+OMAGICSECTIONS: Size: 56<br>
+OMAGICSECTIONS: Link: 0<br>
+OMAGICSECTIONS: Info: 0<br>
+OMAGICSECTIONS: AddressAlignment: 8<br>
+OMAGICSECTIONS: EntrySize: 0<br>
+OMAGICSECTIONS: }<br>
+OMAGICSECTIONS: Section {<br>
+OMAGICSECTIONS: Index: 5<br>
+OMAGICSECTIONS: Name: .tdata (42)<br>
+OMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
+OMAGICSECTIONS: Flags [ (0x403)<br>
+OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
+OMAGICSECTIONS: SHF_TLS (0x400)<br>
+OMAGICSECTIONS: SHF_WRITE (0x1)<br>
+OMAGICSECTIONS: ]<br>
+OMAGICSECTIONS: Address: 0x400120<br>
+OMAGICSECTIONS: Offset: 0x120<br>
+OMAGICSECTIONS: Size: 4<br>
+OMAGICSECTIONS: Link: 0<br>
+OMAGICSECTIONS: Info: 0<br>
+OMAGICSECTIONS: AddressAlignment: 4<br>
+OMAGICSECTIONS: EntrySize: 0<br>
+OMAGICSECTIONS: }<br>
+OMAGICSECTIONS: Section {<br>
+OMAGICSECTIONS: Index: 6<br>
+OMAGICSECTIONS: Name: .tbss (49)<br>
+OMAGICSECTIONS: Type: SHT_NOBITS (0x8)<br>
+OMAGICSECTIONS: Flags [ (0x403)<br>
+OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
+OMAGICSECTIONS: SHF_TLS (0x400)<br>
+OMAGICSECTIONS: SHF_WRITE (0x1)<br>
+OMAGICSECTIONS: ]<br>
+OMAGICSECTIONS: Address: 0x400124<br>
+OMAGICSECTIONS: Offset: 0x124<br>
+OMAGICSECTIONS: Size: 8<br>
+OMAGICSECTIONS: Link: 0<br>
+OMAGICSECTIONS: Info: 0<br>
+OMAGICSECTIONS: AddressAlignment: 4<br>
+OMAGICSECTIONS: EntrySize: 0<br>
+OMAGICSECTIONS: }<br>
+OMAGICSECTIONS: Section {<br>
+OMAGICSECTIONS: Index: 7<br>
+OMAGICSECTIONS: Name: .got.plt (55)<br>
+OMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
+OMAGICSECTIONS: Flags [ (0x3)<br>
+OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
+OMAGICSECTIONS: SHF_WRITE (0x1)<br>
+OMAGICSECTIONS: ]<br>
+OMAGICSECTIONS: Address: 0x400128<br>
+OMAGICSECTIONS: Offset: 0x128<br>
+OMAGICSECTIONS: Size: 0<br>
+OMAGICSECTIONS: Link: 0<br>
+OMAGICSECTIONS: Info: 0<br>
+OMAGICSECTIONS: AddressAlignment: 8<br>
+OMAGICSECTIONS: EntrySize: 0<br>
+OMAGICSECTIONS: }<br>
+OMAGICSECTIONS: Section {<br>
+OMAGICSECTIONS: Index: 8<br>
+OMAGICSECTIONS: Name: .data (64)<br>
+OMAGICSECTIONS: Type: SHT_PROGBITS (0x1)<br>
+OMAGICSECTIONS: Flags [ (0x3)<br>
+OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
+OMAGICSECTIONS: SHF_WRITE (0x1)<br>
+OMAGICSECTIONS: ]<br>
+OMAGICSECTIONS: Address: 0x400128<br>
+OMAGICSECTIONS: Offset: 0x128<br>
+OMAGICSECTIONS: Size: 4<br>
+OMAGICSECTIONS: Link: 0<br>
+OMAGICSECTIONS: Info: 0<br>
+OMAGICSECTIONS: AddressAlignment: 4<br>
+OMAGICSECTIONS: EntrySize: 0<br>
+OMAGICSECTIONS: }<br>
+OMAGICSECTIONS: Section {<br>
+OMAGICSECTIONS: Index: 9<br>
+OMAGICSECTIONS: Name: .bss (70)<br>
+OMAGICSECTIONS: Type: SHT_NOBITS (0x8)<br>
+OMAGICSECTIONS: Flags [ (0x3)<br>
+OMAGICSECTIONS: SHF_ALLOC (0x2)<br>
+OMAGICSECTIONS: SHF_WRITE (0x1)<br>
+OMAGICSECTIONS: ]<br>
+OMAGICSECTIONS: Address: 0x40012C<br>
+OMAGICSECTIONS: Offset: 0x12C<br>
+OMAGICSECTIONS: Size: 0<br>
+OMAGICSECTIONS: Link: 0<br>
+OMAGICSECTIONS: Info: 0<br>
+OMAGICSECTIONS: AddressAlignment: 4<br>
+OMAGICSECTIONS: EntrySize: 0<br>
+OMAGICSECTIONS: }<br>
+OMAGICSECTIONS: Section {<br>
+OMAGICSECTIONS: Index: 10<br>
+OMAGICSECTIONS: Name: .shstrtab (75)<br>
+OMAGICSECTIONS: Type: SHT_STRTAB (0x3)<br>
+OMAGICSECTIONS: Flags [ (0x0)<br>
+OMAGICSECTIONS: ]<br>
+OMAGICSECTIONS: Address: 0x0<br>
+OMAGICSECTIONS: Offset: 0x12C<br>
+OMAGICSECTIONS: Size: 101<br>
+OMAGICSECTIONS: Link: 0<br>
+OMAGICSECTIONS: Info: 0<br>
+OMAGICSECTIONS: AddressAlignment: 1<br>
+OMAGICSECTIONS: EntrySize: 0<br>
+OMAGICSECTIONS: }<br>
+OMAGICSECTIONS: Section {<br>
+OMAGICSECTIONS: Index: 11<br>
+OMAGICSECTIONS: Name: .symtab (85)<br>
+OMAGICSECTIONS: Type: SHT_SYMTAB (0x2)<br>
+OMAGICSECTIONS: Flags [ (0x0)<br>
+OMAGICSECTIONS: ]<br>
+OMAGICSECTIONS: Address: 0x0<br>
+OMAGICSECTIONS: Offset: 0x198<br>
+OMAGICSECTIONS: Size: 528<br>
+OMAGICSECTIONS: Link: 12<br>
+OMAGICSECTIONS: Info: 2<br>
+OMAGICSECTIONS: AddressAlignment: 8<br>
+OMAGICSECTIONS: EntrySize: 24<br>
+OMAGICSECTIONS: }<br>
+OMAGICSECTIONS: Section {<br>
+OMAGICSECTIONS: Index: 12<br>
+OMAGICSECTIONS: Name: .strtab (93)<br>
+OMAGICSECTIONS: Type: SHT_STRTAB (0x3)<br>
+OMAGICSECTIONS: Flags [ (0x0)<br>
+OMAGICSECTIONS: ]<br>
+OMAGICSECTIONS: Address: 0x0<br>
+OMAGICSECTIONS: Offset: 0x3A8<br>
+OMAGICSECTIONS: Size: 246<br>
+OMAGICSECTIONS: Link: 0<br>
+OMAGICSECTIONS: Info: 0<br>
+OMAGICSECTIONS: AddressAlignment: 1<br>
+OMAGICSECTIONS: EntrySize: 0<br>
+OMAGICSECTIONS: }<br>
<br>
OMAGICPROGRAMHEADERS: ProgramHeaders [<br>
OMAGICPROGRAMHEADERS: ProgramHeader {<br>
<br>
Modified: lld/trunk/test/elf/X86_64/orderatoms-by-override.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/orderatoms-by-override.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/orderatoms-by-override.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/X86_64/orderatoms-by-override.test (original)<br>
+++ lld/trunk/test/elf/X86_64/orderatoms-by-override.test Thu Sep 12 10:43:09 2013<br>
@@ -4,5 +4,5 @@ RUN: lld -flavor gnu -target x86_64 %p/I<br>
RUN: %p/Inputs/constint.o -emit-yaml -o %t --noinhibit-exec<br>
RUN: FileCheck %s -check-prefix=CHECKORDER < %t<br>
<br>
-CHECKORDER: - name: a<br>
CHECKORDER: - name: b<br>
+CHECKORDER: - name: a<br>
<br>
Modified: lld/trunk/test/elf/X86_64/undef.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/undef.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/X86_64/undef.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/X86_64/undef.test (original)<br>
+++ lld/trunk/test/elf/X86_64/undef.test Thu Sep 12 10:43:09 2013<br>
@@ -7,13 +7,12 @@ RUN: lld -flavor gnu -target x86_64 %p/I<br>
RUN: llvm-readobj -symbols %t | FileCheck %s<br>
<br>
SYMFROMARCHIVE: Symbol {<br>
-SYMFROMARCHIVE: Name: fn (16)<br>
-SYMFROMARCHIVE: Value: 0x4001A4<br>
+SYMFROMARCHIVE: Name: fn (1)<br>
SYMFROMARCHIVE: Size: 11<br>
SYMFROMARCHIVE: Binding: Global (0x1)<br>
SYMFROMARCHIVE: Type: Function (0x2)<br>
SYMFROMARCHIVE: Other: 0<br>
-SYMFROMARCHIVE: Section: .text (0x5)<br>
+SYMFROMARCHIVE: Section: .text (0x6)<br>
SYMFROMARCHIVE: }<br>
<br>
CHECK-NOT: Name: fn<br>
<br>
Modified: lld/trunk/test/elf/check.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/check.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/check.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/check.test (original)<br>
+++ lld/trunk/test/elf/check.test Thu Sep 12 10:43:09 2013<br>
@@ -4,110 +4,40 @@ RUN: lld -flavor gnu -target i386 -e glo<br>
RUN: %p/Inputs/object-test.elf-i386 -o %t<br>
RUN: FileCheck %s -check-prefix ELF-i386 < %t<br>
RUN: lld -flavor gnu -target hexagon -e global_func --noinhibit-exec -emit-yaml \<br>
-RUN: %p/Inputs/object-test.elf-hexagon | FileCheck %s -check-prefix ELF-hexagon<br>
+RUN: %p/Inputs/object-test.elf-hexagon -o %t1<br>
+RUN: FileCheck %s -check-prefix ELF-hexagon < %t1<br>
<br>
-ELF-i386:defined-atoms:<br>
-ELF-i386: - name: common_symbol<br>
-ELF-i386: scope: global<br>
-ELF-i386: type: zero-fill<br>
-ELF-i386: merge: as-tentative<br>
-<br>
-ELF-i386: - name: tentative<br>
-ELF-i386: scope: global<br>
-ELF-i386: type: zero-fill<br>
-ELF-i386: merge: as-tentative<br>
-<br>
-ELF-i386: - name: global_func<br>
-ELF-i386: scope: global<br>
-ELF-i386: content: [ 55, 89, E5, 83, EC, 18, C7, 04, 24, 00, 00, 00,<br>
-ELF-i386: 00, E8, FC, FF, FF, FF, C9, C3 ]<br>
-<br>
-ELF-i386: - name: static_func<br>
-ELF-i386: content: [ 55, 89, E5, 83, EC, 18, C7, 04, 24, 07, 00, 00,<br>
-ELF-i386: 00, E8, FC, FF, FF, FF, C9, C3 ]<br>
-<br>
-ELF-i386: - name: weak_func<br>
-ELF-i386: scope: global<br>
-ELF-i386: merge: as-weak<br>
-ELF-i386: content: [ 55, 89, E5, 83, EC, 18, C7, 04, 24, 0E, 00, 00,<br>
-ELF-i386: 00, E8, FC, FF, FF, FF, C9, C3 ]<br>
-<br>
-ELF-i386: - name: hidden_func<br>
-ELF-i386: scope: hidden<br>
-ELF-i386: content: [ 55, 89, E5, 83, EC, 18, C7, 04, 24, 13, 00, 00,<br>
-ELF-i386: 00, E8, FC, FF, FF, FF, C9, C3 ]<br>
-<br>
-ELF-i386: - name: no_dead_strip<br>
-ELF-i386: scope: global<br>
-ELF-i386: content: [ 55, 89, E5, 5D, C3 ]<br>
-<br>
-ELF-i386: - name: no_special_section_func<br>
-ELF-i386: scope: global<br>
-ELF-i386: content: [ 55, 89, E5, 5D, C3 ]<br>
-<br>
-ELF-i386: - name: special_section_func<br>
-ELF-i386: scope: global<br>
-ELF-i386: content: [ 55, 89, E5, 5D, C3 ]<br>
-ELF-i386: section-choice: custom-required<br>
-ELF-i386: section-name: special_section<br>
-<br>
-<br>
-ELF-i386:undefined-atoms:<br>
-ELF-i386: - name: puts<br>
-<br>
-ELF-i386:absolute-atoms:<br>
-ELF-i386: - name: sample.c<br>
-ELF-i386: value: 0x0<br>
-<br>
-ELF-hexagon:defined-atoms:<br>
-<br>
-ELF-hexagon: - name: common_symbol<br>
-ELF-hexagon: scope: global<br>
-ELF-hexagon: type: zero-fill<br>
-ELF-hexagon: merge: as-tentative<br>
-<br>
-ELF-hexagon: - name: tentative<br>
-ELF-hexagon: scope: global<br>
-ELF-hexagon: type: zero-fill<br>
-ELF-hexagon: merge: as-tentative<br>
-<br>
-ELF-hexagon: - name: global_func<br>
-ELF-hexagon: scope: global<br>
-ELF-hexagon: content: [ 00, C0, 9D, A0, 00, 40, 00, 00, 00, C0, 00, 78,<br>
-ELF-hexagon: 00, C0, 00, 5A, 1E, C0, 1E, 96 ]<br>
-<br>
-ELF-hexagon: - name: static_func<br>
-ELF-hexagon: content: [ 00, C0, 9D, A0, 00, 40, 00, 00, 00, C0, 00, 78,<br>
-ELF-hexagon: 00, C0, 00, 5A, 1E, C0, 1E, 96 ]<br>
-<br>
-ELF-hexagon: - name: weak_func<br>
-ELF-hexagon: scope: global<br>
-ELF-hexagon: merge: as-weak<br>
-ELF-hexagon: content: [ 00, C0, 9D, A0, 00, 40, 00, 00, 00, C0, 00, 78,<br>
-ELF-hexagon: 00, C0, 00, 5A, 1E, C0, 1E, 96 ]<br>
-<br>
-ELF-hexagon: - name: hidden_func<br>
-ELF-hexagon: scope: hidden<br>
-ELF-hexagon: content: [ 00, C0, 9D, A0, 00, 40, 00, 00, 00, C0, 00, 78,<br>
-ELF-hexagon: 00, C0, 00, 5A, 1E, C0, 1E, 96 ]<br>
-<br>
-ELF-hexagon: - name: no_dead_strip<br>
-ELF-hexagon: scope: global<br>
-ELF-hexagon: content: [ 00, C0, 9D, A0, 1E, C0, 1E, 96 ]<br>
-<br>
-ELF-hexagon: - name: no_special_section_func<br>
-ELF-hexagon: scope: global<br>
-ELF-hexagon: content: [ 00, C0, 9D, A0, 1E, C0, 1E, 96 ]<br>
-<br>
-ELF-hexagon: - name: special_section_func<br>
-ELF-hexagon: scope: global<br>
-ELF-hexagon: content: [ 00, C0, 9D, A0, 1E, C0, 1E, 96 ]<br>
-ELF-hexagon: section-choice: custom-required<br>
-ELF-hexagon: section-name: special_section<br>
-<br>
-ELF-hexagon: undefined-atoms:<br>
-ELF-hexagon: - name: puts<br>
-<br>
-ELF-hexagon: absolute-atoms:<br>
-ELF-hexagon: - name: sample.c<br>
-ELF-hexagon: value: 0x0<br>
+ELF-i386: defined-atoms:<br>
+ELF-i386: - name: global_variable<br>
+ELF-i386: - name: common_symbol<br>
+ELF-i386: - name: tentative<br>
+ELF-i386: - name: uninitialized_static_variable<br>
+ELF-i386: - name: global_func<br>
+ELF-i386: - name: static_func<br>
+ELF-i386: - name: weak_func<br>
+ELF-i386: - name: hidden_func<br>
+ELF-i386: - name: no_dead_strip<br>
+ELF-i386: - name: no_special_section_func<br>
+ELF-i386: - name: special_section_func<br>
+ELF-i386: undefined-atoms:<br>
+ELF-i386: - name: puts<br>
+ELF-i386: absolute-atoms:<br>
+ELF-i386: - name: sample.c<br>
+<br>
+ELF-hexagon: - name: global_variable<br>
+ELF-hexagon: - name: tentative<br>
+ELF-hexagon: - name: common_symbol<br>
+ELF-hexagon: - name: uninitialized_static_variable<br>
+ELF-hexagon: - name: global_func<br>
+ELF-hexagon: - name: static_func<br>
+ELF-hexagon: - name: weak_func<br>
+ELF-hexagon: - name: hidden_func<br>
+ELF-hexagon: - name: no_dead_strip<br>
+ELF-hexagon: - name: no_special_section_func<br>
+ELF-hexagon: - name: special_section_func<br>
+ELF-hexagon: undefined-atoms:<br>
+ELF-hexagon: - name: puts<br>
+ELF-hexagon: absolute-atoms:<br>
+ELF-hexagon: - name: sample.c<br>
+ELF-hexagon: scope: static<br>
+ELF-hexagon: value: 0x0000000000000000<br>
<br>
Modified: lld/trunk/test/elf/checkrodata.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/checkrodata.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/checkrodata.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/checkrodata.test (original)<br>
+++ lld/trunk/test/elf/checkrodata.test Thu Sep 12 10:43:09 2013<br>
@@ -4,6 +4,6 @@ RUN: llvm-objdump -section-headers %t1 |<br>
RUN: lld -flavor gnu -target hexagon -o %t2 %p/Inputs/rodata-test.hexagon --noinhibit-exec<br>
RUN: llvm-objdump -section-headers %t2 | FileCheck -check-prefix=hexagon %s<br>
<br>
-i386: .rodata 00000004 0000000000000114 DATA<br>
+i386: .rodata 00000004 0000000000000111 DATA<br>
<br>
-hexagon: .rodata 00000004 0000000000000114 DATA<br>
+hexagon: .rodata 00000004 0000000000000111 DATA<br>
<br>
Modified: lld/trunk/test/elf/dynamic.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/dynamic.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/dynamic.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/dynamic.test (original)<br>
+++ lld/trunk/test/elf/dynamic.test Thu Sep 12 10:43:09 2013<br>
@@ -9,6 +9,10 @@ RUN: llvm-objdump -p %t >> %t2<br>
RUN: llvm-readobj -s -dyn-symbols -dynamic-table %t >> %t2<br>
RUN: FileCheck %s < %t2<br>
<br>
+CHECK: type: got<br>
+CHECK: references:<br>
+CHECK: kind: R_X86_64_JUMP_SLOT<br>
+<br>
CHECK: name: main<br>
CHECK: kind: R_X86_64_PC32<br>
CHECK: offset: 18<br>
@@ -17,10 +21,6 @@ CHECK: target: [[PLTNAME:[-a-zA-Z0-9_]+<br>
CHECK: name: [[PLTNAME]]<br>
CHECK: type: stub<br>
<br>
-CHECK: type: got<br>
-CHECK: references:<br>
-CHECK: kind: R_X86_64_JUMP_SLOT<br>
-<br>
CHECK: shared-library-atoms:<br>
CHECK: name: foo<br>
CHECK: load-name: shared.so-x86-64<br>
<br>
Modified: lld/trunk/test/elf/gotpcrel.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/gotpcrel.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/gotpcrel.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/gotpcrel.test (original)<br>
+++ lld/trunk/test/elf/gotpcrel.test Thu Sep 12 10:43:09 2013<br>
@@ -3,19 +3,20 @@ RUN: lld -flavor gnu -target x86_64-linu<br>
RUN: --noinhibit-exec %p/Inputs/gotpcrel.x86-64 \<br>
RUN: | FileCheck %s -check-prefix=YAML<br>
<br>
+YAML: name: [[NULLGOT:[a-zA-Z0-9_]+]]<br>
+YAML: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]<br>
+YAML-NOT: references:<br>
+<br>
+YAML: name: [[MAINGOT:[a-zA-Z0-9_]+]]<br>
+YAML: kind: R_X86_64_64<br>
+YAML: target: main<br>
+<br>
YAML: name: main<br>
YAML: references:<br>
YAML: kind: R_X86_64_PC32<br>
YAML: offset: 3<br>
-YAML: target: [[NULLGOT:[a-zA-Z0-9_]+]]<br>
+YAML: target: [[NULLGOT]]<br>
YAML: kind: R_X86_64_PC32<br>
YAML: offset: 10<br>
-YAML: target: [[MAINGOT:[a-zA-Z0-9_]+]]<br>
+YAML: target: [[MAINGOT]]<br>
<br>
-YAML: name: [[NULLGOT]]<br>
-YAML: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]<br>
-YAML-NOT: references:<br>
-<br>
-YAML: name: [[MAINGOT]]<br>
-YAML: kind: R_X86_64_64<br>
-YAML: target: main<br>
<br>
Modified: lld/trunk/test/elf/hexagon-quickdata-sort.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/hexagon-quickdata-sort.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/hexagon-quickdata-sort.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/hexagon-quickdata-sort.test (original)<br>
+++ lld/trunk/test/elf/hexagon-quickdata-sort.test Thu Sep 12 10:43:09 2013<br>
@@ -1,12 +1,12 @@<br>
RUN: lld -flavor gnu -target hexagon %p/Inputs/quickdata-sort-test.o.elf-hexagon -o %t1 --noinhibit-exec<br>
RUN: llvm-nm -n %t1 | FileCheck %s -check-prefix=quickdataSort<br>
<br>
-quickdataSort: 00002000 D A1<br>
-quickdataSort: 00002001 D AA1<br>
-quickdataSort: 00002002 D B1<br>
-quickdataSort: 00002004 D BB1<br>
-quickdataSort: 00002008 D C1<br>
-quickdataSort: 0000200c D CC1<br>
-quickdataSort: 00002010 D D1<br>
-quickdataSort: 00002018 D DD1<br>
+quickdataSort: 00002000 D AA1<br>
+quickdataSort: 00002001 D A1<br>
+quickdataSort: 00002002 D BB1<br>
+quickdataSort: 00002004 D B1<br>
+quickdataSort: 00002008 D CC1<br>
+quickdataSort: 0000200c D C1<br>
+quickdataSort: 00002010 D DD1<br>
+quickdataSort: 00002018 D D1<br>
<br>
<br>
Modified: lld/trunk/test/elf/hexagon-quickdata-sortcommon.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/hexagon-quickdata-sortcommon.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/hexagon-quickdata-sortcommon.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/hexagon-quickdata-sortcommon.test (original)<br>
+++ lld/trunk/test/elf/hexagon-quickdata-sortcommon.test Thu Sep 12 10:43:09 2013<br>
@@ -2,16 +2,15 @@ RUN: lld -flavor gnu -target hexagon -o<br>
RUN: %p/Inputs/quickdata-sortcommon-test.o.elf-hexagon<br>
RUN: llvm-nm -n %t1 | FileCheck %s -check-prefix=quickdataSortCommon<br>
<br>
-quickdataSortCommon: 00002000 D A1<br>
-quickdataSortCommon: 00002001 D AA1<br>
+quickdataSortCommon: 00002000 D AA1<br>
+quickdataSortCommon: 00002001 D A1<br>
quickdataSortCommon: 00002002 D AAA1<br>
-quickdataSortCommon: 00002004 D B1<br>
-quickdataSortCommon: 00002006 D BB1<br>
+quickdataSortCommon: 00002004 D BB1<br>
+quickdataSortCommon: 00002006 D B1<br>
quickdataSortCommon: 00002008 D BBB1<br>
-quickdataSortCommon: 0000200c D C1<br>
-quickdataSortCommon: 00002010 D CC1<br>
+quickdataSortCommon: 0000200c D CC1<br>
+quickdataSortCommon: 00002010 D C1<br>
quickdataSortCommon: 00002014 D CCC1<br>
-quickdataSortCommon: 00002018 D D1<br>
-quickdataSortCommon: 00002020 D DD1<br>
+quickdataSortCommon: 00002018 D DD1<br>
+quickdataSortCommon: 00002020 D D1<br>
quickdataSortCommon: 00002028 D DDD1<br>
-<br>
<br>
Modified: lld/trunk/test/elf/ifunc.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/ifunc.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/ifunc.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/ifunc.test (original)<br>
+++ lld/trunk/test/elf/ifunc.test Thu Sep 12 10:43:09 2013<br>
@@ -14,6 +14,12 @@ RUN: llvm-readobj -r %t | FileCheck %s -<br>
<br>
PLT: defined-atoms:<br>
<br>
+// Make sure there's a got entry with a IRELATIVE relocation.<br>
+PLT: type: got<br>
+PLT: references:<br>
+PLT: kind: R_X86_64_IRELATIVE<br>
+PLT: target: hey<br>
+<br>
PLT: name: plt<br>
PLT: scope: global<br>
PLT: references:<br>
@@ -36,12 +42,6 @@ PLT: type: stub<br>
PLT: references<br>
PLT: kind: R_X86_64_PC32<br>
<br>
-// Make sure there's a got entry with a IRELATIVE relocation.<br>
-PLT: type: got<br>
-PLT: references:<br>
-PLT: kind: R_X86_64_IRELATIVE<br>
-PLT: target: hey<br>
-<br>
CHECK: name: hey<br>
CHECK: scope: global<br>
CHECK: type: resolver<br>
<br>
Modified: lld/trunk/test/elf/quickdata.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/quickdata.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/quickdata.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/quickdata.test (original)<br>
+++ lld/trunk/test/elf/quickdata.test Thu Sep 12 10:43:09 2013<br>
@@ -1,14 +1,14 @@<br>
RUN: lld -flavor gnu -target hexagon -emit-yaml %p/Inputs/quickdata-test.elf-hexagon \<br>
RUN: --noinhibit-exec | FileCheck %s -check-prefix hexagon<br>
<br>
+hexagon: - name: init<br>
+hexagon: scope: global<br>
+hexagon: type: quick-data<br>
hexagon: - name: ac1<br>
hexagon: scope: global<br>
hexagon: type: zero-fill-quick<br>
hexagon: size: 1<br>
hexagon: merge: as-tentative<br>
-hexagon: - name: init<br>
-hexagon: scope: global<br>
-hexagon: type: quick-data<br>
hexagon: - name: bss1<br>
hexagon: scope: global<br>
hexagon: type: zero-fill-quick<br>
<br>
Modified: lld/trunk/test/elf/tls.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/tls.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/tls.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/tls.test (original)<br>
+++ lld/trunk/test/elf/tls.test Thu Sep 12 10:43:09 2013<br>
@@ -7,6 +7,11 @@ RUN: --noinhibit-exec -e main -static<br>
<br>
// Verify that the TLS accesses have the correct offsets.<br>
<br>
+YAML: type: got<br>
+YAML: references:<br>
+YAML: kind: R_X86_64_TPOFF64<br>
+YAML: target: tls2<br>
+<br>
YAML: name: main<br>
YAML: references:<br>
YAML: kind: R_X86_64_TPOFF32<br>
@@ -23,11 +28,6 @@ YAML: name: GOTTPOFF<br>
YAML: kind: R_X86_64_PC32<br>
YAML: target: [[GOTNAME:[a-zA-Z0-9_]+]]<br>
<br>
-YAML: type: got<br>
-YAML: references:<br>
-YAML: kind: R_X86_64_TPOFF64<br>
-YAML: target: tls2<br>
-<br>
<br>
// main<br>
CHECK: addl %fs:-4<br>
<br>
Modified: lld/trunk/test/elf/x86-64-dynamic.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/x86-64-dynamic.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/elf/x86-64-dynamic.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/elf/x86-64-dynamic.test (original)<br>
+++ lld/trunk/test/elf/x86-64-dynamic.test Thu Sep 12 10:43:09 2013<br>
@@ -5,6 +5,15 @@ RUN: %p/Inputs/shared.so-x86-64 -emit-<br>
RUN: FileCheck %s < %t1<br>
<br>
// Don't check the GOT and PLT names as they are only present in assert builds.<br>
+CHECK: type: got<br>
+CHECK: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]<br>
+CHECK: section-choice: custom-required<br>
+CHECK: section-name: .got.dyn<br>
+CHECK: permissions: rw-<br>
+CHECK: references:<br>
+CHECK: - kind: R_X86_64_GLOB_DAT<br>
+CHECK: offset: 0<br>
+CHECK: target: i<br>
<br>
CHECK: - name: main<br>
CHECK: scope: global<br>
@@ -53,16 +62,6 @@ CHECK: - kind: R_X86_64_<br>
CHECK: offset: 12<br>
target: .PLT0<br>
CHECK: addend: -4<br>
-CHECK: name: [[GOTNAME]]<br>
-CHECK: type: got<br>
-CHECK: content: [ 00, 00, 00, 00, 00, 00, 00, 00 ]<br>
-CHECK: section-choice: custom-required<br>
-CHECK: section-name: .got.dyn<br>
-CHECK: permissions: rw-<br>
-CHECK: references:<br>
-CHECK: - kind: R_X86_64_GLOB_DAT<br>
-CHECK: offset: 0<br>
-CHECK: target: i<br>
<br>
<br>
<br>
<br>
Modified: lld/trunk/test/pecoff/importlib.test<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/test/pecoff/importlib.test?rev=190608&r1=190607&r2=190608&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/test/pecoff/importlib.test?rev=190608&r1=190607&r2=190608&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/test/pecoff/importlib.test (original)<br>
+++ lld/trunk/test/pecoff/importlib.test Thu Sep 12 10:43:09 2013<br>
@@ -27,11 +27,11 @@ CHECK-NEXT: .text:<br>
CHECK-NEXT: 1000: 55 pushl %ebp<br>
CHECK-NEXT: 1001: 8b ec movl %esp, %ebp<br>
CHECK-NEXT: 1003: 56 pushl %esi<br>
-CHECK-NEXT: 1004: ff 15 78 20 40 00 calll *4202616<br>
-CHECK-NEXT: 100a: 8b 0d 7c 20 40 00 movl 4202620, %ecx<br>
+CHECK-NEXT: 1004: ff 15 22 20 40 00 calll *4202530<br>
+CHECK-NEXT: 100a: 8b 0d 26 20 40 00 movl 4202534, %ecx<br>
CHECK-NEXT: 1010: 8b 31 movl (%ecx), %esi<br>
CHECK-NEXT: 1012: 03 f0 addl %eax, %esi<br>
-CHECK-NEXT: 1014: ff 15 74 20 40 00 calll *4202612<br>
+CHECK-NEXT: 1014: ff 15 1e 20 40 00 calll *4202526<br>
CHECK-NEXT: 101a: 03 c6 addl %esi, %eax<br>
CHECK-NEXT: 101c: 5e popl %esi<br>
CHECK-NEXT: 101d: 5d popl %ebp<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>