Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Converge on 4k Section Alignment for AARCH64 Builds (#352)
# Preface Please ensure you have read the [contribution docs](https://github.com/microsoft/mu/blob/master/CONTRIBUTING.md) prior to submitting the pull request. In particular, [pull request guidelines](https://github.com/microsoft/mu/blob/master/CONTRIBUTING.md#pull-request-best-practices). ## Description Currently tools_def.template sets two different common-page-sizes for GCC/Clang AARCH64 builds. This is not a supported configuration. This leads to ambiguity and relying on the toolchain to interpret the arguments in a certain way, which they are not guaranteed to do. This leads to the case where the same code can fail to be aligned to the required 4k boundary because the incorrect common-page-size was chosen. This PR removes the incorrect common-page-size for AARCH64 GCC/Clang builds and only uses the 4kb alignment to remove the ambiguity and fix errors seen where the wrong common-page-size gets chosen by the toolchain. This PR also removes some of the duplicate instances of setting the common-page-size that exist to try to reduce issues in the future if it is changed. However, it was not attempted to reduce all of the duplicated instances in order to not miss edge cases and instead only the clearly duplicated cases where a new macro expanded another macro that contained common-page-size and then set common-page-size directly afterwards. For each item, place an "x" in between `[` and `]` if true. Example: `[x]`. _(you can also check items in the GitHub UI)_ - [ ] Impacts functionality? - **Functionality** - Does the change ultimately impact how firmware functions? - Examples: Add a new library, publish a new PPI, update an algorithm, ... - [ ] Impacts security? - **Security** - Does the change have a direct security impact on an application, flow, or firmware? - Examples: Crypto algorithm change, buffer overflow fix, parameter validation improvement, ... - [ ] Breaking change? - **Breaking change** - Will anyone consuming this change experience a break in build or boot behavior? - Examples: Add a new library class, move a module to a different repo, call a function in a new library class in a pre-existing module, ... - [ ] Includes tests? - **Tests** - Does the change include any explicit test code? - Examples: Unit tests, integration tests, robot tests, ... - [ ] Includes documentation? - **Documentation** - Does the change contain explicit documentation additions outside direct code modifications (and comments)? - Examples: Update readme file, add feature readme file, link to documentation on an a separate Web page, ... ## How This Was Tested Tested by running in a local CI build that was failing due to the local GCC toolchain choosing the non-4k alignment argument passed to it and GenFw failing due to incorrect section alignment. With this fix, the CI build passes. ## Integration Instructions To integrate this change, pull the latest mu_basecore and delete the top level Conf directory. This will get regenerated from the updated mu_basecore tools_def.template.
- Loading branch information