mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-25 10:48:14 +00:00
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. llvm-svn: 294048
This commit is contained in:
parent
c1d820c0a7
commit
2532431332
@ -603,8 +603,6 @@ OutputSectionFactory<ELFT>::create(const SectionKey &Key,
|
||||
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};
|
||||
}
|
||||
|
||||
|
@ -1876,16 +1876,13 @@ MergeSyntheticSection<ELFT>::MergeSyntheticSection(StringRef Name,
|
||||
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) {
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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: )
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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: )
|
||||
|
@ -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.
|
||||
|
@ -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.|
|
||||
|
@ -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: )
|
||||
|
@ -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: )
|
||||
|
@ -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: )
|
||||
|
@ -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: )
|
||||
|
@ -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
|
||||
|
@ -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: )
|
||||
|
@ -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: )
|
||||
|
Loading…
x
Reference in New Issue
Block a user