diff options
author | Fangrui Song <i@maskray.me> | 2022-05-12 11:03:12 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2022-05-12 11:03:12 -0700 |
commit | ebdb9d635a077274e38baa8584f5b0e631b4b1d3 (patch) | |
tree | 48ae88185cc7454eba9de4afd5e10bf6f6065bf0 /lld/docs | |
parent | 9f732af583c0dba58847b753a87cc5432ec33f09 (diff) | |
download | llvm-ebdb9d635a077274e38baa8584f5b0e631b4b1d3.tar.gz |
[ELF] Align the end of PT_GNU_RELRO to max-page-size instead of common-page-size
We picked common-page-size to match GNU ld. Recently, the resolution to GNU ld
https://sourceware.org/bugzilla/show_bug.cgi?id=28824 (milestone: 2.39) switched
to max-page-size so that the last page can be protected by RELRO in case the
system page size is larger than common-page-size.
Thanks to our two RW PT_LOAD scheme (D58892), switching to max-page-size does
not change file size (while GNU ld's scheme may increase file size).
Reviewed By: peter.smith
Differential Revision: https://reviews.llvm.org/D125410
Diffstat (limited to 'lld/docs')
-rw-r--r-- | lld/docs/ReleaseNotes.rst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lld/docs/ReleaseNotes.rst b/lld/docs/ReleaseNotes.rst index b3751e53db55..645721fbb803 100644 --- a/lld/docs/ReleaseNotes.rst +++ b/lld/docs/ReleaseNotes.rst @@ -29,6 +29,10 @@ ELF Improvements * ``-z pack-relative-relocs`` is now available to support ``DT_RELR`` for glibc 2.36+. (`D120701 <https://reviews.llvm.org/D120701>`_) * ``--no-fortran-common`` (pre 12.0.0 behavior) is now the default. +* The end of ``PT_GNU_RELRO`` is now aligned by ``max-page-size`` instead of ``common-page-size``. + This matches GNU ld from 2.39 onwards. If the system page size is larger than ``common-page-size``, + the previous choice may make a partial page not protected by RELRO. + (`D125410 <https://reviews.llvm.org/D125410>`_) Breaking changes ---------------- |