base/android: ModernLinker: Test CreateSharedRelroFd()
The test creates a fake RELRO region in private memory and checks that it is spawned into a sealed read-only shared memory region. Since the normal way of using the ModernLinker involves a separate DSO (=shared library), this would add more moving parts to base_unittests. We prefer less advanced ways with GN, so another approach is chosen: all the necessary code is linked with base_unittests. Testing the way ModernLinker loads libraries would be difficult without extra libraries pushed to the device, but RELRO region creation, sharing and consumption can be tested using this approach. Bug: 1154224 Change-Id: Ia78cce98f566084f6f799a7a35ab3cc45beb9346 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2571758Reviewed-by:Benoit L <lizeb@chromium.org> Commit-Queue: Egor Pasko <pasko@chromium.org> Cr-Commit-Position: refs/heads/master@{#833793}
Showing
This diff is collapsed.
Please register or sign in to comment