sort quickdata for the hexagon target

llvm-svn: 175904
diff --git a/lld/lib/ReaderWriter/ELF/Writer.cpp b/lld/lib/ReaderWriter/ELF/Writer.cpp
index 0cd0e55..4272eb8 100644
--- a/lld/lib/ReaderWriter/ELF/Writer.cpp
+++ b/lld/lib/ReaderWriter/ELF/Writer.cpp
@@ -231,11 +231,14 @@
   (*endAtomIter)->_virtualAddr = (*phe)->p_vaddr + (*phe)->p_memsz;
 }
 
-template<class ELFT>
-error_code
-ExecutableWriter<ELFT>::writeFile(const File &file, StringRef path) {
+template <class ELFT>
+error_code ExecutableWriter<ELFT>::writeFile(const File &file, StringRef path) {
   buildChunks(file);
 
+  // Call the preFlight callbacks to modify the sections and the atoms 
+  // contained in them, in anyway the targets may want
+  _layout->doPreFlight();
+
   // Create the default sections like the symbol table, string table, and the
   // section string table
   createDefaultSections();