release/23.x: [compiler-rt] Disable executable stack on aeabi_u{read,write}*.S (#214465) - #214489
Merged
Conversation
Member
Author
|
@statham-arm What do you think about merging this PR to the release branch? |
smithp35
approved these changes
Aug 6, 2026
smithp35
left a comment
Contributor
There was a problem hiding this comment.
LGTM, so that @statham-arm , indirectly isn't the only one reviewing his own submitted cherry-pick.
This is a simple and safe change for functions that do not require an executable stack.
statham-arm
approved these changes
Aug 6, 2026
statham-arm
left a comment
Contributor
There was a problem hiding this comment.
Yes, I also think this should be cherry-picked (or I wouldn't have pressed the button in the first place 🙂). It's very low risk, and fixes a problem that is increasingly severe – the most recent Ubuntu, for example, has a version of glibc that will outright reject executable stacks in shared libraries it loads.
compnerd
approved these changes
Aug 6, 2026
…lvm#214465) These were missing `NO_EXEC_STACK_DIRECTIVE` to add `.note.GNU-stack`; without it, a binary including any of these files will have the stack marked executable. Add the directive here, matching other similar files. Symtab diff before: $ clang compiler-rt/lib/builtins/arm/aeabi_uread4.S --target=arm-unknown-linux-gnueabi -c $ llvm-readelf aeabi_uread4.o -S There are 5 section headers, starting at offset 0xe4: Section Headers: [Nr] Name Type Address Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .strtab STRTAB 00000000 0000a8 000039 00 0 0 1 [ 2] .text PROGBITS 00000000 000034 000020 00 AX 0 0 4 [ 3] .ARM.attributes ARM_ATTRIBUTES 00000000 000054 000022 00 0 0 1 [ 4] .symtab SYMTAB 00000000 000078 000030 10 1 2 4 After: $ clang compiler-rt/lib/builtins/arm/aeabi_uread4.S --target=arm-unknown-linux-gnueabi -c $ llvm-readelf aeabi_uread4.o -S There are 6 section headers, starting at offset 0xf4: Section Headers: [Nr] Name Type Address Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .strtab STRTAB 00000000 0000a8 000049 00 0 0 1 [ 2] .text PROGBITS 00000000 000034 000020 00 AX 0 0 4 [ 3] .note.GNU-stack PROGBITS 00000000 000054 000000 00 0 0 1 [ 4] .ARM.attributes ARM_ATTRIBUTES 00000000 000054 000022 00 0 0 1 [ 5] .symtab SYMTAB 00000000 000078 000030 10 1 2 4 Fixes: 39413af ("[Compiler-rt] Implement AEABI Unaligned Read/Write Helpers in compiler-rt (llvm#167913)") (cherry picked from commit 849c51e)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport 849c51e
Requested by: @statham-arm