@@ -52,13 +52,13 @@ static ArrayRef<uint8_t> getSectionContents(ObjFile<ELFT> &file,
5252 return check (file.getObj ().getSectionContents (hdr));
5353}
5454
55- InputSectionBase::InputSectionBase (InputFile *file, uint64_t flags ,
56- uint32_t type, uint64_t entsize ,
57- uint32_t link , uint32_t info ,
58- uint32_t addralign , ArrayRef<uint8_t > data,
59- StringRef name, Kind sectionKind)
60- : SectionBase(sectionKind, file, name, flags, entsize, addralign, type ,
61- info, link ),
55+ InputSectionBase::InputSectionBase (InputFile *file, StringRef name ,
56+ uint32_t type, uint64_t flags, uint32_t link ,
57+ uint32_t info , uint32_t addralign ,
58+ uint32_t entsize , ArrayRef<uint8_t > data,
59+ Kind sectionKind)
60+ : SectionBase(sectionKind, file, name, type, flags, link, info, addralign ,
61+ entsize ),
6262 content_(data.data()), size(data.size()) {
6363 // In order to reduce memory allocation, we assume that mergeable
6464 // sections are smaller than 4 GiB, which is not an unreasonable
@@ -95,10 +95,10 @@ template <class ELFT>
9595InputSectionBase::InputSectionBase (ObjFile<ELFT> &file,
9696 const typename ELFT::Shdr &hdr,
9797 StringRef name, Kind sectionKind)
98- : InputSectionBase(&file, getFlags(file.ctx, hdr.sh_flags) , hdr.sh_type,
99- hdr.sh_entsize , hdr.sh_link , hdr.sh_info ,
100- hdr.sh_addralign, getSectionContents(file, hdr), name ,
101- sectionKind) {
98+ : InputSectionBase(&file, name , hdr.sh_type,
99+ getFlags (file.ctx , hdr.sh_flags) , hdr.sh_link ,
100+ hdr.sh_info, hdr.sh_addralign, hdr.sh_entsize ,
101+ getSectionContents(file, hdr), sectionKind) {
102102 // We reject object files having insanely large alignments even though
103103 // they are allowed by the spec. I think 4GB is a reasonable limitation.
104104 // We might want to relax this in the future.
@@ -355,18 +355,19 @@ std::string InputSectionBase::getObjMsg(uint64_t off) const {
355355
356356PotentialSpillSection::PotentialSpillSection (const InputSectionBase &source,
357357 InputSectionDescription &isd)
358- : InputSection(source.file, source.flags , source.type, source.addralign, {} ,
359- source.name , SectionBase::Spill),
358+ : InputSection(source.file, source.name , source.type, source.flags ,
359+ source.addralign, source.addralign, {} , SectionBase::Spill),
360360 isd(&isd) {}
361361
362- InputSection InputSection::discarded (nullptr , 0 , 0 , 0 , ArrayRef<uint8_t >(), "");
362+ InputSection InputSection::discarded (nullptr , " " , 0 , 0 , 0 , 0 ,
363+ ArrayRef<uint8_t >());
363364
364- InputSection::InputSection (InputFile *f, uint64_t flags , uint32_t type,
365- uint32_t addralign, ArrayRef< uint8_t > data ,
366- StringRef name , Kind k)
367- : InputSectionBase(f, flags , type,
368- /* Entsize */ 0 , /* Link */ 0 , /* Info */ 0 , addralign, data ,
369- name , k) {
365+ InputSection::InputSection (InputFile *f, StringRef name , uint32_t type,
366+ uint64_t flags, uint32_t addralign, uint32_t entsize ,
367+ ArrayRef< uint8_t > data , Kind k)
368+ : InputSectionBase(f, name , type, flags ,
369+ /* link= */ 0 , /* info= */ 0 , addralign, /* entsize= */ entsize ,
370+ data , k) {
370371 assert (f || this == &InputSection::discarded);
371372}
372373
@@ -1437,12 +1438,13 @@ MergeInputSection::MergeInputSection(ObjFile<ELFT> &f,
14371438 StringRef name)
14381439 : InputSectionBase(f, header, name, InputSectionBase::Merge) {}
14391440
1440- MergeInputSection::MergeInputSection (Ctx &ctx, uint64_t flags , uint32_t type,
1441- uint64_t entsize, ArrayRef< uint8_t > data ,
1442- StringRef name )
1443- : InputSectionBase(ctx.internalFile, flags , type, entsize , /* link=*/ 0 ,
1441+ MergeInputSection::MergeInputSection (Ctx &ctx, StringRef name , uint32_t type,
1442+ uint64_t flags, uint64_t entsize ,
1443+ ArrayRef< uint8_t > data )
1444+ : InputSectionBase(ctx.internalFile, name , type, flags , /* link=*/ 0 ,
14441445 /* info=*/ 0 ,
1445- /* alignment=*/ entsize, data, name, SectionBase::Merge) {}
1446+ /* addralign=*/ entsize, entsize, data,
1447+ SectionBase::Merge) {}
14461448
14471449// This function is called after we obtain a complete list of input sections
14481450// that need to be linked. This is responsible to split section contents
0 commit comments