[PATCH] D36262: [ELF] - Do not forget to fill last bytes of PT_LOADs with trap instructions.

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 04:41:51 PDT 2017


ruiu added inline comments.


================
Comment at: ELF/OutputSections.cpp:310
 // This is used for linker script "=fillexp" command.
-static void fill(uint8_t *Buf, size_t Size, uint32_t Filler) {
+void elf::fill(uint8_t *Buf, size_t Size, uint32_t Filler) {
   size_t I = 0;
----------------
This function is so small that you don't want to share. Just copy the contents.


================
Comment at: test/ELF/build-id.s:50-59
 # DEFAULT-NEXT: 04000000 08000000 03000000 474e5500  ............GNU.
-# DEFAULT-NEXT: d618a375 bc6301ec
+# DEFAULT-NEXT: b0148597 ba5eb7e9
 
 # MD5:      Contents of section .note.gnu.build-id:
 # MD5-NEXT: 04000000 10000000 03000000 474e5500  ............GNU.
-# MD5-NEXT: 051084fe ce1f30ed e035b79e 11262808
+# MD5-NEXT: dce3bcaf 5219454c e89a1fc7 86ab17bd
 
----------------
These tests don't really test the thing you want to test. Please write a real test.


https://reviews.llvm.org/D36262





More information about the llvm-commits mailing list