|
|
|
|
|
by okanat
333 days ago
|
|
Because the final ELF binary is linked to contain page aligned segments. Segments define how should the binary be loaded into memory and what permissions they require. If you have a 4KB segment that is marked Read-Write followed immediately by a Read-Execute, naively loading it will open a can of security issues. Moreover many platform data structures like Global Object Table of the dynamic executable uses addresses. You cannot simply bump things around. On top of that libraries like C++ standard library (or abseil from Google) rely on the page size to optimize data structures like hash maps (i.e. unordered_map). |
|