[lld] r259516 - Expand comment a bit.

Rafael Espindola via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 2 07:45:38 PST 2016


Author: rafael
Date: Tue Feb  2 09:45:37 2016
New Revision: 259516

URL: http://llvm.org/viewvc/llvm-project?rev=259516&view=rev
Log:
Expand comment a bit.

I have spent some time prototyping this idea. While it seems to work, I
now think it is probably not worth it.

Modified:
    lld/trunk/ELF/Writer.cpp

Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=259516&r1=259515&r2=259516&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Tue Feb  2 09:45:37 2016
@@ -247,6 +247,11 @@ static bool handleTlsRelocation(unsigned
 // * Apply relocations, recording which ones require a dynamic reloc.
 // * Write the dynamic relocations.
 // * Write the rest of the file.
+// This would have some drawbacks. For example, we would only know if .rela.dyn
+// is needed after applying relocations. If it is, it will go after rw and rx
+// sections. Given that it is ro, we will need an extra PT_LOAD. This
+// complicates things for the dynamic linker and means we would have to reserve
+// space for the extra PT_LOAD even if we end up not using it.
 template <class ELFT>
 template <bool isRela>
 void Writer<ELFT>::scanRelocs(




More information about the llvm-commits mailing list