[PATCH] D44775: [ELF] - Fill executable segments with trap instructions.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 26 13:44:02 PDT 2018
ruiu added inline comments.
================
Comment at: ELF/Arch/X86.cpp:446
0xc3, // 2e: ret
+ 0xcc // 2f: int3; .align 48
};
----------------
Please remove `; .align 48` because that doesn't really explain what this code does. (Also we want to align it not to 48 but 16).
================
Comment at: ELF/Arch/X86.cpp:466
+ 0xe9, 0, 0, 0, 0, // jmp plt+0
+ 0xcc, 0xcc, 0xcc, 0xcc, 0xcc // int3; .align 32
};
----------------
Ditto
================
Comment at: ELF/Arch/X86_64.cpp:503-504
0xc3, // 24: ret
+ 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc,
+ 0xcc, 0xcc, 0xcc, 0xcc // 25: int3; .align 48
};
----------------
Do this
0xcc, 0xcc, ... // int3
0xcc, 0xcc, ... // int3
so that the comments are aligned vertically.
================
Comment at: ELF/Arch/X86_64.cpp:552
0xc3, // 14: ret
+ 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc,
+ 0xcc, 0xcc, 0xcc, 0xcc, 0xcc // 15: int3; .align 48
----------------
Ditto
https://reviews.llvm.org/D44775
More information about the llvm-commits
mailing list