Skip to content

Commit c52fc3c

Browse files
committed
[LLD][Xtensa] Fix sections placements.
1 parent 0b255ec commit c52fc3c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lld/ELF/Writer.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -1393,6 +1393,10 @@ static void sortSection(OutputSection &osec,
13931393
if (auto *isd = dyn_cast<InputSectionDescription>(b))
13941394
sortISDBySectionOrder(isd, order, osec.flags & SHF_EXECINSTR);
13951395

1396+
if (config->emachine == EM_XTENSA) {
1397+
osec.sort([](InputSectionBase *s) { return s->name.contains(".literal") ? 0 : 1; });
1398+
}
1399+
13961400
if (script->hasSectionsCommand)
13971401
return;
13981402

0 commit comments

Comments
 (0)