Zhiyao's Home Page
Zhiyao's Home Page
Home
Posts
Publications
TA
Contact
Resource
Light
Dark
Automatic
Language
Changing Rust Enum Variant with Mutable Reference
Changing a Rust enum variant through a mutable reference can be achieved either by wrapping the variant attached variable inside
Option
, or better, by introducing an
Undef
variant in the enum.
Zhiyao Ma
Feb 14, 2024
3 min read
Language
Call Rust Closure From Assembly Code
Calling a Rust closure from assembly code involves erasing the type and converting everything into raw pointers before passing to the assembly code, and then reconstructing Rust objects from the raw pointers once control returns to Rust.
Zhiyao Ma
Last updated on Apr 2, 2023
5 min read
Language
Symbols in Compiled Object File and Their Attributes
We show by example the generated symbols of C constructs and their attributes in each case. We also provide a Rust program for examining the symbols in an object file.
Zhiyao Ma
Dec 6, 2022
5 min read
Language
An Introduction to Stack Unwinding and Exception Handling
We give an overview of the stack unwinding and exception handling for C++ like languages on x86_64. We describe the use of
.eh_frame
and
.gcc_except_table
section and the 2-phase unwinding procedure.
Zhiyao Ma
Mar 28, 2022
10 min read
Language
,
Stack Unwinding
Building LLVM Compiler-RT for ARM MCU
We introduce compiler instrinsic functions and resolve undefined symbols to
__aeabi_*
when cross-compiling for ARM microcontrollers.
Zhiyao Ma
Jan 25, 2022
3 min read
Language
Cite
×