Skip to content

esp32s3: fix boot crash caused by LLVM 22 / lld l32r relocation bug#5533

Open
deadprogram wants to merge 1 commit into
devfrom
esp32s3-fix-start
Open

esp32s3: fix boot crash caused by LLVM 22 / lld l32r relocation bug#5533
deadprogram wants to merge 1 commit into
devfrom
esp32s3-fix-start

Conversation

@deadprogram

Copy link
Copy Markdown
Member

Replace movi instructions with constants outside the 12-bit signed range (-2048..2047) with movi+slli sequences. Large constants cause the assembler to emit auto-generated .literal section entries, which triggers an lld bug where l32r PC-relative offsets are miscalculated when .literal.* sections are merged with .text.* sections.

Replace movi instructions with constants outside the 12-bit signed
range (-2048..2047) with movi+slli sequences. Large constants cause
the assembler to emit auto-generated .literal section entries, which
triggers an lld bug where l32r PC-relative offsets are miscalculated
when .literal.* sections are merged with .text.* sections.

Signed-off-by: deadprogram <ron@hybridgroup.com>
@github-actions

Copy link
Copy Markdown

Size difference with the dev branch:

Binary size difference
 flash                          ram
 before   after   diff          before   after   diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant