Commit graph

4 commits

Author SHA1 Message Date
Peter Collingbourne
bb11ee6d9c Remove PAGE_SIZE call sites.
To enable experiments with non-4KiB page sizes, introduce
an inline page_size() function that will either return the runtime
page size (if PAGE_SIZE is not 4096) or a constant 4096 (elsewhere).
This should ensure that there are no changes to the generated code on
unaffected platforms.

Test: source build/envsetup.sh
      lunch aosp_cf_arm64_16k_phone-userdebug
      m -j32 installclean
      m -j32
Test: launch_cvd \
  -kernel_path /path/to/out/android14-5.15/dist/Image \
  -initramfs_path /path/to/out/android14-5.15/dist/initramfs.img \
  -userdata_format=ext4
Bug: 277272383
Bug: 230790254
Change-Id: Ic0ed98b67f7c6b845804b90a4e16649f2fc94028
2023-06-12 10:59:39 -07:00
Dimitry Ivanov
bcc4da9b75 Unify linker files under one license (BSD)
Historically we had part of the linker licensed under BSD and
another part under Apache 2 license. This commit makes all the
linker code licensed under BSD license.

Test: m
Change-Id: I11b8163ae75966b5768d3fe992679de376106515
2017-02-15 15:35:33 -08:00
Dmitriy Ivanov
84bab5a955 Move some utility functions to linker_utils
Also adds unit-tests for page_start, page_offset, and safe_add

Change-Id: Ia1325b4682d367328a01599a19848e4ffcd2c0ea
2015-11-20 21:37:51 +00:00
Dmitriy Ivanov
cf1cbbe432 refactoring: introduce MappedFileFragment
Change-Id: I97b0c1131711ed0ac13ab33e3357e99e0b6b1a4e
2015-10-22 18:01:56 -07:00