[lld] r294048 - Stop propagating Entsize.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 3 13:29:52 PST 2017
Author: rafael
Date: Fri Feb 3 15:29:51 2017
New Revision: 294048
URL: http://llvm.org/viewvc/llvm-project?rev=294048&view=rev
Log:
Stop propagating Entsize.
Now that we combine multiple synthetic merge section into one output
section there is no point in trying to propagate a value.
Modified:
lld/trunk/ELF/OutputSections.cpp
lld/trunk/ELF/SyntheticSections.cpp
lld/trunk/test/ELF/basic-aarch64.s
lld/trunk/test/ELF/basic-mips.s
lld/trunk/test/ELF/basic-ppc.s
lld/trunk/test/ELF/basic.s
lld/trunk/test/ELF/basic32.s
lld/trunk/test/ELF/basic64be.s
lld/trunk/test/ELF/build-id.s
lld/trunk/test/ELF/compressed-debug-input.s
lld/trunk/test/ELF/gc-merge-local-sym.s
lld/trunk/test/ELF/gc-sections-merge-addend.s
lld/trunk/test/ELF/gc-sections-merge-implicit-addend.s
lld/trunk/test/ELF/gc-sections-merge.s
lld/trunk/test/ELF/linkerscript/merge-sections.s
lld/trunk/test/ELF/merge-string.s
lld/trunk/test/ELF/merge.s
Modified: lld/trunk/ELF/OutputSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/ELF/OutputSections.cpp (original)
+++ lld/trunk/ELF/OutputSections.cpp Fri Feb 3 15:29:51 2017
@@ -603,8 +603,6 @@ OutputSectionFactory<ELFT>::create(const
if (C->kind() == InputSectionBase<ELFT>::EHFrame)
return {Out<ELFT>::EhFrame, false};
Sec = make<OutputSection<ELFT>>(Key.Name, Type, Flags);
- if (Flags & SHF_MERGE)
- Sec->Entsize = C->Entsize;
return {Sec, true};
}
Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Fri Feb 3 15:29:51 2017
@@ -1876,16 +1876,13 @@ MergeSyntheticSection<ELFT>::MergeSynthe
uint32_t Type, uintX_t Flags,
uintX_t Alignment)
: SyntheticSection<ELFT>(Flags, Type, Alignment, Name),
- Builder(StringTableBuilder::RAW, Alignment) {
- this->Entsize = Alignment;
-}
+ Builder(StringTableBuilder::RAW, Alignment) {}
template <class ELFT>
void MergeSyntheticSection<ELFT>::addSection(MergeInputSection<ELFT> *MS) {
assert(!Finalized);
MS->MergeSec = this;
Sections.push_back(MS);
- this->Entsize = MS->Entsize;
}
template <class ELFT> void MergeSyntheticSection<ELFT>::writeTo(uint8_t *Buf) {
Modified: lld/trunk/test/ELF/basic-aarch64.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/basic-aarch64.s?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/test/ELF/basic-aarch64.s (original)
+++ lld/trunk/test/ELF/basic-aarch64.s Fri Feb 3 15:29:51 2017
@@ -81,7 +81,7 @@ _start:
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
# CHECK-NEXT: AddressAlignment: 1
-# CHECK-NEXT: EntrySize: 1
+# CHECK-NEXT: EntrySize: 0
# CHECK-NEXT: }
# CHECK-NEXT: Section {
# CHECK-NEXT: Index: 3
Modified: lld/trunk/test/ELF/basic-mips.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/basic-mips.s?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/test/ELF/basic-mips.s (original)
+++ lld/trunk/test/ELF/basic-mips.s Fri Feb 3 15:29:51 2017
@@ -164,7 +164,7 @@ __start:
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
# CHECK-NEXT: AddressAlignment: 1
-# CHECK-NEXT: EntrySize: 1
+# CHECK-NEXT: EntrySize: 0
# CHECK-NEXT: }
# CHECK-NEXT: Section {
# CHECK-NEXT: Index: 8
Modified: lld/trunk/test/ELF/basic-ppc.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/basic-ppc.s?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/test/ELF/basic-ppc.s (original)
+++ lld/trunk/test/ELF/basic-ppc.s Fri Feb 3 15:29:51 2017
@@ -163,7 +163,7 @@
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 1
-// CHECK-NEXT: EntrySize: 1
+// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 4C4C4420 312E3000 |LLD 1.0.|
// CHECK-NEXT: )
Modified: lld/trunk/test/ELF/basic.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/basic.s?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/test/ELF/basic.s (original)
+++ lld/trunk/test/ELF/basic.s Fri Feb 3 15:29:51 2017
@@ -83,7 +83,7 @@ _start:
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
# CHECK-NEXT: AddressAlignment: 1
-# CHECK-NEXT: EntrySize: 1
+# CHECK-NEXT: EntrySize: 0
# CHECK-NEXT: }
# CHECK-NEXT: Section {
# CHECK-NEXT: Index: 3
Modified: lld/trunk/test/ELF/basic32.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/basic32.s?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/test/ELF/basic32.s (original)
+++ lld/trunk/test/ELF/basic32.s Fri Feb 3 15:29:51 2017
@@ -80,7 +80,7 @@ _start:
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
# CHECK-NEXT: AddressAlignment: 1
-# CHECK-NEXT: EntrySize: 1
+# CHECK-NEXT: EntrySize: 0
# CHECK-NEXT: }
# CHECK-NEXT: Section {
# CHECK-NEXT: Index: 3
Modified: lld/trunk/test/ELF/basic64be.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/basic64be.s?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/test/ELF/basic64be.s (original)
+++ lld/trunk/test/ELF/basic64be.s Fri Feb 3 15:29:51 2017
@@ -175,7 +175,7 @@ _start:
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
# CHECK-NEXT: AddressAlignment: 1
-# CHECK-NEXT: EntrySize: 1
+# CHECK-NEXT: EntrySize: 0
# CHECK-NEXT: SectionData (
# CHECK-NEXT: 0000: 4C4C4420 312E3000 |LLD 1.0.|
# CHECK-NEXT: )
Modified: lld/trunk/test/ELF/build-id.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/build-id.s?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/test/ELF/build-id.s (original)
+++ lld/trunk/test/ELF/build-id.s Fri Feb 3 15:29:51 2017
@@ -44,15 +44,15 @@ _start:
# DEFAULT: Contents of section .note.test:
# DEFAULT: Contents of section .note.gnu.build-id:
# DEFAULT-NEXT: 04000000 08000000 03000000 474e5500 ............GNU.
-# DEFAULT-NEXT: d08dafb4 e6294b62
+# DEFAULT-NEXT: fd36edb1 f6ff02af
# MD5: Contents of section .note.gnu.build-id:
# MD5-NEXT: 04000000 10000000 03000000 474e5500 ............GNU.
-# MD5-NEXT: 37
+# MD5-NEXT: fc
# SHA1: Contents of section .note.gnu.build-id:
# SHA1-NEXT: 04000000 14000000 03000000 474e5500 ............GNU.
-# SHA1-NEXT: 7a4f4eaf 69ceb948 4a7d6e51 2225e87c
+# SHA1-NEXT: 55b1eedb 03b588e1 09987d1d e9a79be7
# UUID: Contents of section .note.gnu.build-id:
# UUID-NEXT: 04000000 10000000 03000000 474e5500 ............GNU.
Modified: lld/trunk/test/ELF/compressed-debug-input.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/compressed-debug-input.s?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/test/ELF/compressed-debug-input.s (original)
+++ lld/trunk/test/ELF/compressed-debug-input.s Fri Feb 3 15:29:51 2017
@@ -59,7 +59,7 @@
# DATA-NEXT: Link: 0
# DATA-NEXT: Info: 0
# DATA-NEXT: AddressAlignment: 1
-# DATA-NEXT: EntrySize: 1
+# DATA-NEXT: EntrySize: 0
# DATA-NEXT: SectionData (
# DATA-NEXT: 0000: 73686F72 7420756E 7369676E 65642069 |short unsigned i|
# DATA-NEXT: 0010: 6E740075 6E736967 6E656420 696E7400 |nt.unsigned int.|
Modified: lld/trunk/test/ELF/gc-merge-local-sym.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/gc-merge-local-sym.s?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/test/ELF/gc-merge-local-sym.s (original)
+++ lld/trunk/test/ELF/gc-merge-local-sym.s Fri Feb 3 15:29:51 2017
@@ -15,7 +15,7 @@
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 1
-// CHECK-NEXT: EntrySize: 1
+// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 61626300 |abc.|
// CHECK-NEXT: )
Modified: lld/trunk/test/ELF/gc-sections-merge-addend.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/gc-sections-merge-addend.s?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/test/ELF/gc-sections-merge-addend.s (original)
+++ lld/trunk/test/ELF/gc-sections-merge-addend.s Fri Feb 3 15:29:51 2017
@@ -16,7 +16,7 @@
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 1
-// CHECK-NEXT: EntrySize: 1
+// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 62617200 |bar.|
// CHECK-NEXT: )
Modified: lld/trunk/test/ELF/gc-sections-merge-implicit-addend.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/gc-sections-merge-implicit-addend.s?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/test/ELF/gc-sections-merge-implicit-addend.s (original)
+++ lld/trunk/test/ELF/gc-sections-merge-implicit-addend.s Fri Feb 3 15:29:51 2017
@@ -16,7 +16,7 @@
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 1
-// CHECK-NEXT: EntrySize: 1
+// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 62617200 |bar.|
// CHECK-NEXT: )
Modified: lld/trunk/test/ELF/gc-sections-merge.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/gc-sections-merge.s?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/test/ELF/gc-sections-merge.s (original)
+++ lld/trunk/test/ELF/gc-sections-merge.s Fri Feb 3 15:29:51 2017
@@ -18,7 +18,7 @@
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 1
-// CHECK-NEXT: EntrySize: 1
+// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 666F6F00 62617200 |foo.bar.|
// CHECK-NEXT: )
@@ -36,7 +36,7 @@
// GC-NEXT: Link: 0
// GC-NEXT: Info: 0
// GC-NEXT: AddressAlignment: 1
-// GC-NEXT: EntrySize: 1
+// GC-NEXT: EntrySize: 0
// GC-NEXT: SectionData (
// GC-NEXT: 0000: 666F6F00 |foo.|
// GC-NEXT: )
Modified: lld/trunk/test/ELF/linkerscript/merge-sections.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/linkerscript/merge-sections.s?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/test/ELF/linkerscript/merge-sections.s (original)
+++ lld/trunk/test/ELF/linkerscript/merge-sections.s Fri Feb 3 15:29:51 2017
@@ -21,7 +21,7 @@
# CHECK-NEXT: Link: 0
# CHECK-NEXT: Info: 0
# CHECK-NEXT: AddressAlignment: 2
-# CHECK-NEXT: EntrySize: 1
+# CHECK-NEXT: EntrySize: 0
# CHECK-NEXT: }
# CHECK: Name: begin
Modified: lld/trunk/test/ELF/merge-string.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/merge-string.s?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/test/ELF/merge-string.s (original)
+++ lld/trunk/test/ELF/merge-string.s Fri Feb 3 15:29:51 2017
@@ -34,7 +34,7 @@ zed:
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 1
-// CHECK-NEXT: EntrySize: 1
+// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 61626300 |abc.|
// CHECK-NEXT: )
@@ -52,7 +52,7 @@ zed:
// NOTAIL-NEXT: Link: 0
// NOTAIL-NEXT: Info: 0
// NOTAIL-NEXT: AddressAlignment: 1
-// NOTAIL-NEXT: EntrySize: 1
+// NOTAIL-NEXT: EntrySize: 0
// NOTAIL-NEXT: SectionData (
// NOTAIL-NEXT: 0000: 61626300 626300 |abc.bc.|
// NOTAIL-NEXT: )
@@ -86,7 +86,7 @@ zed:
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 2
-// CHECK-NEXT: EntrySize: 2
+// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 14000000 |....|
// CHECK-NEXT: )
Modified: lld/trunk/test/ELF/merge.s
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/merge.s?rev=294048&r1=294047&r2=294048&view=diff
==============================================================================
--- lld/trunk/test/ELF/merge.s (original)
+++ lld/trunk/test/ELF/merge.s Fri Feb 3 15:29:51 2017
@@ -29,7 +29,7 @@ zed:
// CHECK-NEXT: Link: 0
// CHECK-NEXT: Info: 0
// CHECK-NEXT: AddressAlignment: 4
-// CHECK-NEXT: EntrySize: 4
+// CHECK-NEXT: EntrySize: 0
// CHECK-NEXT: SectionData (
// CHECK-NEXT: 0000: 10000000 42000000
// CHECK-NEXT: )
More information about the llvm-commits
mailing list