[ELF2] Only call getPPC64SectionRank for EM_PPC64 files
Suggested by Rafael in his review of r250100. As Rafael points out, this may grow into a switch in the future, but regardless, calling this on files for other architectures is unnecessary. llvm-svn: 250209
This commit is contained in:
parent
deac4909c7
commit
9abc2a50b3
|
@ -331,7 +331,13 @@ static bool compareOutputSections(OutputSectionBase<ELFT::Is64Bits> *A,
|
|||
A->getType() != B->getType())
|
||||
return A->getType() != SHT_NOBITS && B->getType() == SHT_NOBITS;
|
||||
|
||||
return getPPC64SectionRank(A->getName()) < getPPC64SectionRank(B->getName());
|
||||
// Some architectures have additional ordering restrictions for sections
|
||||
// within the same PT_LOAD.
|
||||
if (Config->EMachine == EM_PPC64)
|
||||
return getPPC64SectionRank(A->getName()) <
|
||||
getPPC64SectionRank(B->getName());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// Until this function is called, common symbols do not belong to any section.
|
||||
|
|
Loading…
Reference in New Issue