Put data in .rodata and, rather than adr, use the combination of adrp :pg_hi21: and add :lo12:. Unfortunately, iOS uses different syntax, so we must add more transforms to arm-xlate.pl. Tested manually by: 1. Use Android NDK r19-beta1 2. Follow usual instructions to configure CMake for aarch64, but pass -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld -Wl,-execute-only". 3. Build. Confirm with readelf -l tool/bssl that .text is not marked readable. 4. Push the test binaries onto a Pixel 3. Test normally and with --cpu={none,neon,crypto}. I had to pass --gtest_filter=-*Thread* to crypto_test. There appears to be an issue with some runtime function that's unrelated to our assembly. No measurable performance difference. Going forward, to support this, we will need to apply similar changes to all other AArch64 assembly. This is relatively straightforward, but may be a little finicky for dual-AArch32/AArch64 files (aesv8-armx.pl). Update-Note: Assembly syntax is a mess. There's a decent chance some assembler will get offend. Change-Id: Ib59b921d4cce76584320fefd23e6bb7ebd4847eb Reviewed-on: https://boringssl-review.googlesource.com/c/33245 Reviewed-by: Adam Langley <agl@google.com> Commit-Queue: David Benjamin <davidben@google.com>
BoringSSL
BoringSSL is a fork of OpenSSL that is designed to meet Google's needs.
Although BoringSSL is an open source project, it is not intended for general use, as OpenSSL is. We don't recommend that third parties depend upon it. Doing so is likely to be frustrating because there are no guarantees of API or ABI stability.
Programs ship their own copies of BoringSSL when they use it and we update everything as needed when deciding to make API changes. This allows us to mostly avoid compromises in the name of compatibility. It works for us, but it may not work for you.
BoringSSL arose because Google used OpenSSL for many years in various ways and, over time, built up a large number of patches that were maintained while tracking upstream OpenSSL. As Google's product portfolio became more complex, more copies of OpenSSL sprung up and the effort involved in maintaining all these patches in multiple places was growing steadily.
Currently BoringSSL is the SSL library in Chrome/Chromium, Android (but it's not part of the NDK) and a number of other apps/programs.
There are other files in this directory which might be helpful:
- PORTING.md: how to port OpenSSL-using code to BoringSSL.
- BUILDING.md: how to build BoringSSL
- INCORPORATING.md: how to incorporate BoringSSL into a project.
- API-CONVENTIONS.md: general API conventions for BoringSSL consumers and developers.
- STYLE.md: rules and guidelines for coding style.
- include/openssl: public headers with API documentation in comments. Also available online.
- FUZZING.md: information about fuzzing BoringSSL.
- CONTRIBUTING.md: how to contribute to BoringSSL.
- BREAKING-CHANGES.md: notes on potentially-breaking changes.