Skip to content

Commit a2648bc

Browse files
committed
[ELF] Remove remnant ranks for PPC64 ELFv1 special sections
1 parent 63bd772 commit a2648bc

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

lld/ELF/Writer.cpp

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -840,8 +840,6 @@ enum RankFlags {
840840
RF_NOT_RELRO = 1 << 9,
841841
RF_NOT_TLS = 1 << 8,
842842
RF_BSS = 1 << 7,
843-
RF_PPC_NOT_TOCBSS = 1 << 6,
844-
RF_PPC_TOCL = 1 << 5,
845843
RF_PPC_TOC = 1 << 4,
846844
RF_PPC_GOT = 1 << 3,
847845
RF_PPC_BRANCH_LT = 1 << 2,
@@ -943,16 +941,8 @@ static unsigned getSectionRank(const OutputSection &osec) {
943941
// PPC64 has a number of special SHT_PROGBITS+SHF_ALLOC+SHF_WRITE sections
944942
// that we would like to make sure appear is a specific order to maximize
945943
// their coverage by a single signed 16-bit offset from the TOC base
946-
// pointer. Conversely, the special .tocbss section should be first among
947-
// all SHT_NOBITS sections. This will put it next to the loaded special
948-
// PPC64 sections (and, thus, within reach of the TOC base pointer).
944+
// pointer.
949945
StringRef name = osec.name;
950-
if (name != ".tocbss")
951-
rank |= RF_PPC_NOT_TOCBSS;
952-
953-
if (name == ".toc1")
954-
rank |= RF_PPC_TOCL;
955-
956946
if (name == ".toc")
957947
rank |= RF_PPC_TOC;
958948

0 commit comments

Comments
 (0)