[all-commits] [llvm/llvm-project] 5133a8: [Driver] Add -fandroid-pad-segment/-fno-android-pa...

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Jan 17 14:39:40 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5133a8f5590d74d9d15631742a3d84f978394dbd
      https://github.com/llvm/llvm-project/commit/5133a8f5590d74d9d15631742a3d84f978394dbd
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-01-17 (Wed, 17 Jan 2024)

  Changed paths:
    M clang/include/clang/Driver/Options.td
    M clang/lib/Driver/ToolChains/Gnu.cpp
    A clang/test/Driver/Inputs/basic_android_tree/sysroot/usr/lib/crt_pad_segment.o
    M clang/test/Driver/linux-ld.c

  Log Message:
  -----------
  [Driver] Add -fandroid-pad-segment/-fno-android-pad-segment (#77244)

-fandroid-pad-segment is an Android-specific opt-in option that
links in crt_pad_segment.o (beside other crt*.o relocatable files).

crt_pad_segment.o contains a note section, which will be included in the
linker-created PT_NOTE segment. This PT_NOTE tell Bionic that: when
create a map for a PT_LOAD segment, extend the end to cover the gap so
that we will have fewer kernel 'struct vm_area_struct' objects when
page_size < MAXPAGESIZE.

See also https://sourceware.org/bugzilla/show_bug.cgi?id=31076

Link: https://r.android.com/2902180




More information about the All-commits mailing list