This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by grimar on Aug 3 2017, 4:00 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

grimar created this revision.Aug 3 2017, 4:00 AM
ruiu added inline comments.Aug 3 2017, 4:41 AM
ELF/OutputSections.cpp
310 ↗(On Diff #109510)

This function is so small that you don't want to share. Just copy the contents.

test/ELF/build-id.s
50–59 ↗(On Diff #109510)

These tests don't really test the thing you want to test. Please write a real test.

grimar updated this revision to Diff 110002.Aug 7 2017, 8:08 AM
  • Addressd review comments.
ruiu added inline comments.Aug 16 2017, 3:50 PM
ELF/Writer.cpp
1815 ↗(On Diff #110002)

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?

grimar updated this revision to Diff 111480.Aug 17 2017, 2:12 AM
  • Addressed review comment.
ELF/Writer.cpp
1815 ↗(On Diff #110002)

Yes. And then what about inlining fillTrapInstr?

ruiu added inline comments.Aug 17 2017, 7:42 AM
ELF/Writer.cpp
1815 ↗(On Diff #110002)

I think I still prefer outlining it.

grimar updated this revision to Diff 111623.Aug 18 2017, 1:00 AM
  • Addressed review comment.
ruiu accepted this revision.Aug 18 2017, 2:36 PM

LGTM

This revision is now accepted and ready to land.Aug 18 2017, 2:36 PM
This revision was automatically updated to reflect the committed changes.