[compiler-rt] Disable executable stack on aeabi_u{read,write}*.S - #214465
Merged
Conversation
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)")
Contributor
Author
|
Picked up in part of rust's CI rust-lang/compiler-builtins#1246 (comment) @compnerd @simpal01 @statham-arm @vhscampos could you review? (rt maintainer plus reviewer from where this was introduced) |
statham-arm
approved these changes
Aug 6, 2026
Contributor
Author
|
@statham-arm could you please merge this for me? |
Contributor
Author
|
/cherry-pick 849c51e |
Contributor
Author
|
I think I'll need some help setting the milestone. This should be cherry picked since it was introduced in LLVM23 |
Member
Error: Command failed due to missing milestone. |
Contributor
|
/cherry-pick 849c51e |
Member
|
/pull-request #214489 |
tgross35
added a commit
to rust-lang/compiler-builtins
that referenced
this pull request
Aug 7, 2026
Pull in a patch that landed just recently but hasn't yet been backported. Without it, symcheck fails. Link: llvm/llvm-project#214465
tgross35
added a commit
to tgross35/compiler-builtins
that referenced
this pull request
Aug 7, 2026
Pull in a patch that landed just recently but hasn't yet been backported. Without it, symcheck fails. Link: llvm/llvm-project#214465
dyung
pushed a commit
to llvmbot/llvm-project
that referenced
this pull request
Aug 7, 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)
tgross35
added a commit
to tgross35/rust
that referenced
this pull request
Aug 17, 2026
Pull in a patch that landed just recently but hasn't yet been backported. Without it, symcheck fails. Link: llvm/llvm-project#214465
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.
These were missing
NO_EXEC_STACK_DIRECTIVEto 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:
After:
Fixes: 39413af ("[Compiler-rt] Implement AEABI Unaligned Read/Write
Helpers in compiler-rt (#167913)")