Skip to content

Commit

Permalink
Make PT_LOAD explicitly read-execute and PT_DYNAMIC explicitly re…
Browse files Browse the repository at this point in the history
…ad-only

When we make `librrpage.so` non-absolutely positioned, the dynamic loader will try
to relocate `PT_DYNAMIC` if it's not marked read-only. The kernel's VDSO has
readonly `PT_DYNAMIC` so we're matching that.
  • Loading branch information
rocallahan committed Aug 17, 2024
1 parent 137a48b commit 646d7ab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/preload/rr_page.ld.in
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PHDRS
{
text PT_LOAD FILEHDR PHDRS;
dynamic PT_DYNAMIC ;
note PT_NOTE ;
eh_frame 0x6474e550 ;
text PT_LOAD FLAGS(5) FILEHDR PHDRS;
dynamic PT_DYNAMIC FLAGS(4);
note PT_NOTE FLAGS(4);
eh_frame 0x6474e550;
replay PT_NULL;
}
SECTIONS
Expand Down

0 comments on commit 646d7ab

Please sign in to comment.