[PATCH] D45788: Mitigate relocation overflow [part 1 of 2]

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 27 03:19:07 PDT 2018


grimar added a comment.

Can you add a test case showing the difference in layout after this patch applied?



================
Comment at: ELF/Writer.cpp:720
 
+  // Place .dynsym and .dynstr at the beginning of "ALLOC"
+  // sections. We want to do this to mitigate the possibility that
----------------
"ALLOC" -> SHF_ALLOC or "ALLOC" -> allocatable


================
Comment at: ELF/Writer.cpp:725
+  // ALLOC attribute, whereas sections that only have SHT_STRTAB but
+  // without ALLOC is placed at the end. All "Sec" reaching here has
+  // "ALLOC" bit set.
----------------
Please be consistent. You mix `ALLOC` and `"ALLOC"`. I would just use SHF_ALLOC everywhere.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D45788





More information about the llvm-commits mailing list