#no-std #build-id

no-std buildid-linker-symbols

Configure the linker to support buildid crate's "buildid-symbol-start-end" feature

2 stable releases

Uses new Rust 2021

1.0.1 Jan 28, 2022
1.0.0 Nov 12, 2021

#218 in Build Utils

24 downloads per month
Used in buildid

MPL-2.0 license

2KB

buildid: get the buildid from your (running) library or executable

println!("{:?}", buildid::build_id())

build-id is a value which is guaranteed to change when any of the component objects of a binary change. A change in the build-id does not guarantee that the executable or it's components are actually different. Two distinct executables may have a different build-id if they were modified after linking (for example, by chrpath or similar).

build-id is intended to be sufficient to identify the appropriate debug information to use for a given object, and is used for this purpose by gdb and other debuggers.

build-id is also used by mesa as a key component in their caching of shaders (changes in the build-id cause the cache to be discarded).

Executables and shared objects contain build-ids. Using buildid::build_id() will return the build-id for the object that includes buildid (this crate). For example, if you write a shared object (shared library) using this crate, and provide a way to get the build-id in it's external API, that call will return the build-id of the shared object/library (not the executable).

By default, the buildid crate will pick the best build-id lookup function it can for your platform. If one is not avaliable, it may fail to compile. If you have a custom build-id lookup mechanism you want to tell buildid about, enabling one of the features may help.

License

Licensed under Mozilla Public License 2.0

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be licensed as above, without any additional terms or conditions.

No runtime deps