[all-commits] [llvm/llvm-project] ebdb9d: [ELF] Align the end of PT_GNU_RELRO to max-page-si...

Fangrui Song via All-commits all-commits at lists.llvm.org
Thu May 12 11:03:26 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ebdb9d635a077274e38baa8584f5b0e631b4b1d3
      https://github.com/llvm/llvm-project/commit/ebdb9d635a077274e38baa8584f5b0e631b4b1d3
  Author: Fangrui Song <i at maskray.me>
  Date:   2022-05-12 (Thu, 12 May 2022)

  Changed paths:
    M lld/ELF/Writer.cpp
    M lld/docs/ReleaseNotes.rst
    M lld/test/ELF/aarch64-relro.s
    M lld/test/ELF/basic-ppc64.s

  Log Message:
  -----------
  [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




More information about the All-commits mailing list