Skip to content

Conversation

@grendello
Copy link
Contributor

@grendello grendello commented Jun 19, 2024

This is just for parity with what clang uses, it will align the libxamarin-app.so
library to a more natural boundary of 4k bytes (size of a memory page on Android)

Without the flag, the shared library is aligned to 64k bytes, which is wasteful with
regards to consumed memory (not much, but still) and may also make memory access slightly
slower than necessary.

This is just for parity with what `clang` uses, it will align the
`libxamarin-app.so` library to a more natural boundary of 4k bytes
(size of a memory page on Android)
@grendello grendello changed the title Explicitly align to 4k [runtime] Explicitly align application shared library to page size Jun 19, 2024
@grendello grendello merged commit e174305 into main Jun 19, 2024
@grendello grendello deleted the dev/grendel/native-linker-flags branch June 19, 2024 13:59
grendello added a commit that referenced this pull request Jun 21, 2024
* main: (26 commits)
  Make APK and shared library alignment configurable (#9046)
  [r8] update proguard rule to keep .NET runtime classes (#9044)
  Explicitly align to 4k (#9041)
  [trimming] preserve custom views and `$(AndroidHttpClientHandlerType)` (#8954)
  Ignore split configs when bundle config moves shared libraries to base.apk (#8987)
  Bump to dotnet/android-tools@1c09dcc (#9026)
  Bump to dotnet/java-interop@ccafbe6 (#9025)
  [Mono.Android-Tests] Fix repo URL in redirect tests (#9035)
  [ci] Update checkout path for nightly build (#9028)
  [ci] Fix android source path for MAUI test job (#9030)
  Link Code of Conduct (#9034)
  [ci] Update sdk-insertions trigger to manual only (#9029)
  Update java-interop and android-tools submodule mentions (#9023)
  LEGO: Merge pull request 9022
  [Xamarin.Android.Build.Tasks] fastdev works with aab files (#8990)
  Use new binutils URL (#9019)
  Localized file check-in by OneLocBuild Task: Build definition ID 17928: Build ID 9686669 (#9011)
  LEGO: Merge pull request 9015
  [api-merge] Update "constant" values to mirror latest API levels (#9004)
  [Mono.Android] Fix wrong value for `ApplicationExitInfoReason.Other` (#9003)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Jul 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants