Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BaseTools/tools_def ARM: Disable stack protector with CLANGDWARF #6207

Conversation

ardbiesheuvel
Copy link
Member

Clang insists on emitting a movt/movw pair into the function pro/epilogues to load the stack protector reference value from memory, and this movt/movw pair may turn out non-consecutively in the instruction stream.

The resulting symbol reference cannot be fixed up by GenFw, as PE/COFF always treats movt/movw as a pair, and the ELF-to-PE conversion will therefore fail.

Just disable the stack protector when using CLANGDWARF.

@ardbiesheuvel
Copy link
Member Author

cc @os-d @TaylorBeebe

@lgao4 lgao4 added the push Auto push patch series in PR if all checks pass label Sep 18, 2024
Clang insists on emitting a movt/movw pair into the function
pro/epilogues to load the stack protector reference value from memory,
and this movt/movw pair may turn out non-consecutively in the
instruction stream.

The resulting symbol reference cannot be fixed up by GenFw, as PE/COFF
always treats movt/movw as a pair, and the ELF-to-PE conversion will
therefore fail.

Just disable the stack protector when using CLANGDWARF.

Signed-off-by: Ard Biesheuvel <[email protected]>
@lgao4 lgao4 force-pushed the basetools-arm-clangdwarf-disable-stack-protector branch from 2321610 to e1fe08d Compare September 18, 2024 01:28
@mergify mergify bot merged commit 170fa8e into tianocore:master Sep 18, 2024
126 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
push Auto push patch series in PR if all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants