Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions zksync_os/src/asm/asm_reduced.S
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ _abs_start:
Machine trap entry point (_machine_start_trap)
*/
.section .trap, "ax"
.global machine_default_start_trap
.global _machine_start_trap
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

Defining _machine_start_trap as a global (strong) symbol means it can no longer be overridden by another object file without causing a duplicate symbol link error. If the previous PROVIDE(_machine_start_trap = machine_default_start_trap) behavior was intentionally allowing overrides, consider marking this symbol weak (or restoring a weak alias pattern) to preserve that behavior while keeping the new name.

Suggested change
.global _machine_start_trap
.weak _machine_start_trap

Copilot uses AI. Check for mistakes.
.align 4
machine_default_start_trap:
_machine_start_trap:
// We assume that exception stack is always saved to MSCRATCH

// so we swap it with x31
Expand Down
1 change: 0 additions & 1 deletion zksync_os/src/lds/link.x
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ PROVIDE(_setup_interrupts = default_setup_interrupts);
but by providing the `_start_trap` symbol external crates can override.
*/
PROVIDE(_start_trap = default_start_trap);
PROVIDE(_machine_start_trap = machine_default_start_trap);

PHDRS
{
Expand Down
1 change: 0 additions & 1 deletion zksync_os/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ pub unsafe fn custom_setup_interrupts() {

/// Exception (trap) handler in rust.
/// Currently not supported.
// TODO(EVM-1189): remove machine_default_start_trap entry point to binary.
#[link_section = ".trap.rust"]
#[export_name = "_machine_start_trap_rust"]
pub extern "C" fn machine_start_trap_rust(trap_frame: *mut MachineTrapFrame) -> usize {
Expand Down
Loading