-
Notifications
You must be signed in to change notification settings - Fork 130
fix(l1,l2): build on ARM Linux #5285
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
Conversation
ELF assemblers require a different syntax than MACH-O ones for labels. This was breaking the Linux build for ARM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the ARM Linux build by introducing separate assembly files for ELF (Linux) and MACH-O (macOS) assemblers, which require different label reference syntax.
Key Changes:
- Split the single ARM assembly file into platform-specific versions using conditional compilation
- MACH-O version uses
@PAGE/@PAGEOFFsyntax for label references - ELF version uses
:lo12:syntax for label references
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| crates/common/crypto/keccak/mod.rs | Added conditional compilation to include ELF assembly for Linux and MACH-O assembly for macOS |
| crates/common/crypto/keccak/keccak1600-armv8-macho.s | New MACH-O-specific assembly file with @PAGE/@PAGEOFF label syntax for macOS |
| crates/common/crypto/keccak/keccak1600-armv8-elf.s | New ELF-specific assembly file with :lo12: label syntax for Linux |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // - Removed dots from all local labels for correct detection in the frontend. | ||
| // Reason: `.L` local labels are ELF-specific. |
Copilot
AI
Nov 11, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment states "Removed dots from all local labels for correct detection in the frontend. Reason: .L local labels are ELF-specific." This is misleading in the ELF assembly file context. .L labels are indeed ELF-specific, so they should be acceptable in ELF assembly. This comment appears to be copied from the MACH-O file where it makes sense (removing ELF-specific features from MACH-O). Consider clarifying that the dots were removed for consistency or compatibility reasons, not because they're problematic in ELF.
| // - Removed dots from all local labels for correct detection in the frontend. | |
| // Reason: `.L` local labels are ELF-specific. | |
| // - Removed dots from all local labels for consistent detection in the frontend and cross-platform compatibility. | |
| // Note: `.L` local labels are ELF-specific and valid in ELF, but dots were removed for consistency across platforms and tooling. |
Lines of code reportTotal lines added: Detailed view |
ELF assemblers require a different syntax than MACH-O ones for labels.
This was breaking the Linux build for ARM.