D33630 implemented filling load segments with trap,
but it has bug - it forgets to set last 4 bytes.
Patch fixes the issue.
Details
Details
- Reviewers
phosek ruiu • rafael - Commits
- rGf7ef2a13f674: [ELF] - Recommit "[ELF] - Do not forget to fill last bytes of PT_LOADs with…
rGc7392cbe9adc: [ELF] - Do not forget to fill last bytes of PT_LOADs with trap instructions.
rLLD311315: [ELF] - Recommit "[ELF] - Do not forget to fill last bytes of PT_LOADs with…
rLLD311310: [ELF] - Do not forget to fill last bytes of PT_LOADs with trap instructions.
rL311315: [ELF] - Recommit "[ELF] - Do not forget to fill last bytes of PT_LOADs with…
rL311310: [ELF] - Do not forget to fill last bytes of PT_LOADs with trap instructions.
Diff Detail
Diff Detail
Event Timeline
ELF/Writer.cpp | ||
---|---|---|
1832–1833 | We can safely assume that End-I is a multiple of 4. So you want to change < to <= instead of adding a new line of code, no? |
Comment Actions
- Addressed review comment.
ELF/Writer.cpp | ||
---|---|---|
1832–1833 | Yes. And then what about inlining fillTrapInstr? |
ELF/Writer.cpp | ||
---|---|---|
1832–1833 | I think I still prefer outlining it. |
This function is so small that you don't want to share. Just copy the contents.