Skip to content

Commit eb439b1

Browse files
omit ByName as suggested
1 parent 27778e5 commit eb439b1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lld/ELF/Writer.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -554,9 +554,8 @@ template <class ELFT> void Writer<ELFT>::addSectionSymbols() {
554554
}
555555

556556
// Returns true if the section is a data section that's read only and
557-
// relocatable per its section name. Note this function doesn't look at section
558-
// sh_type or sh_flags.
559-
static bool isRelRoDataSectionByName(Ctx &ctx, StringRef SectionName) {
557+
// relocatable per its section name.
558+
static bool isRelRoDataSection(Ctx &ctx, StringRef SectionName) {
560559
// If -z keep-data-section-prefix is given, '<section>.hot' and
561560
// '<section>.unlikely' is considered a split of '<section>' based on
562561
// hotness. They should share the same section attributes.
@@ -646,7 +645,7 @@ static bool isRelroSection(Ctx &ctx, const OutputSection *sec) {
646645
// magic section names.
647646
StringRef s = sec->name;
648647

649-
bool abiAgnostic = isRelRoDataSectionByName(ctx, s) || s == ".bss.rel.ro" ||
648+
bool abiAgnostic = isRelRoDataSection(ctx, s) || s == ".bss.rel.ro" ||
650649
s == ".ctors" || s == ".dtors" || s == ".jcr" ||
651650
s == ".eh_frame" || s == ".fini_array" ||
652651
s == ".init_array" || s == ".preinit_array";

0 commit comments

Comments
 (0)