Closed
Description
Location
https://doc.rust-lang.org/stable/core/arch/macro.global_asm.html
Summary
Ran into a surprising bug today - global_asm!
stuck some executable code into .rodata
under release mode. The fix was simple - just needed to add a .section .text
directive, but was surprising and neither the docs nor the book seem to mention this (maybe I missed it).
I documented my findings here: https://github.com/oro-os/development-notes/blob/master/Development%20Notes/x86/Scheduler%20Refactor%20(Mar%20'25).md#9-march-2025-fun-with-global_asm-linkage
Would you accept a PR to add a note about this?