summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Writer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Writer.cpp')
-rw-r--r--lld/ELF/Writer.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 7c9e7cf7a40..460c1a2ea24 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -699,8 +699,6 @@ template <class ELFT> void SymbolTableSection<ELFT>::writeTo(uint8_t *Buf) {
}
}
- uint8_t *GlobalStart = Buf;
-
for (auto &P : Table.getSymbols()) {
StringRef Name = P.first;
Symbol *Sym = P.second;
@@ -755,14 +753,6 @@ template <class ELFT> void SymbolTableSection<ELFT>::writeTo(uint8_t *Buf) {
Buf += sizeof(Elf_Sym);
}
-
- // The order the global symbols are in is not defined. We can use an arbitrary
- // order, but it has to be reproducible. That is true even when cross linking.
- // The default hashing of StringRef produces different results on 32 and 64
- // bit systems so we sort by st_name. That is arbitrary but deterministic.
- // FIXME: Experiment with passing in a custom hashing instead.
- auto *Syms = reinterpret_cast<Elf_Sym *>(GlobalStart);
- array_pod_sort(Syms, Syms + NumVisible - NumLocals, compareSym<ELFT>);
}
template <bool Is64Bits>
OpenPOWER on IntegriCloud