stephenrkell / liballocs

Meta-level run-time services for Unix processes... a.k.a. dragging Unix into the 1980s
http://humprog.org/~stephen/research/liballocs
Other
215 stars 26 forks source link

Rust toolchain support #89

Open stephenrkell opened 7 months ago

stephenrkell commented 7 months ago

It'd be nice to be able to introspect on memory that is allocated by/for Rust code. Currently I don't have a clear enough handle on rustc or cargo to know how best to do this, although I'm working on piecing together the necessary understanding. (Someone told me that Rust programs don't go through a linker?! That does not seem right.)

jryans commented 7 months ago

(Someone told me that Rust programs don't go through a linker?! That does not seem right.)

Rust definitely invokes the linker. See for example this mention in Rust Compiler Development Guide (partly linking to this so you're generally aware of the guide, which may be useful if you dive deeper into Rust tooling).

There is a TargetOptions struct for every target Rust supports, which includes info like the default linker and such.

You can also override the linker to be used via a codegen option (-C linker=<foo>).