Skip to content

Commit

Permalink
Compute end of RELRO based on vaddr start rather than page-aligned start
Browse files Browse the repository at this point in the history
  • Loading branch information
rinon committed Oct 5, 2024
1 parent 1b71922 commit 4ed050c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/libia2/ia2.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ int protect_pages(struct dl_phdr_info *info, size_t size, void *data) {

struct AddressRange *relro_range = &shared_ranges[shared_range_count++];
relro_range->start = (info->dlpi_addr + phdr.p_vaddr) & ~0xFFFUL;
relro_range->end = (relro_range->start + phdr.p_memsz + 0xFFFUL) & ~0xFFFUL;
relro_range->end = (info->dlpi_addr + phdr.p_vaddr + phdr.p_memsz + 0xFFFUL) & ~0xFFFUL;

break;
}
Expand Down

0 comments on commit 4ed050c

Please sign in to comment.