Skip to content

release/23.x: [compiler-rt] Disable executable stack on aeabi_u{read,write}*.S (#214465) - #214489

Merged
dyung merged 1 commit into
llvm:release/23.xfrom
llvmbot:issue214465
Aug 7, 2026
Merged

release/23.x: [compiler-rt] Disable executable stack on aeabi_u{read,write}*.S (#214465)#214489
dyung merged 1 commit into
llvm:release/23.xfrom
llvmbot:issue214465

Conversation

@llvmbot

@llvmbot llvmbot commented Aug 6, 2026

Copy link
Copy Markdown
Member

Backport 849c51e

Requested by: @statham-arm

@llvmbot

llvmbot commented Aug 6, 2026

Copy link
Copy Markdown
Member Author

@statham-arm What do you think about merging this PR to the release branch?

@smithp35 smithp35 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@github-project-automation github-project-automation Bot moved this from Needs Triage to Needs Merge in LLVM Release Status Aug 6, 2026

@statham-arm statham-arm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

…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)
@dyung
dyung merged commit b7cde8f into llvm:release/23.x Aug 7, 2026
3 of 8 checks passed
@github-project-automation github-project-automation Bot moved this from Needs Merge to Done in LLVM Release Status Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

6 participants