If linker tricks donโ€™t work across dylibs, how do function pointers works accross dylibs?

โš“ Rust    ๐Ÿ“… 2025-06-25    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 6      

surdeus

Warning

This post was published 48 days ago. The information described in this article may have changed.

From the internal forum

I thought that address of function were guaranteed to be unique, including when dynamically loading a library. I thought that the runtime dynamic linker would relocate all the address of the functions of the dynamically loaded library and all call to those functions.

If linker tricks do not work across dylibs, how function pointer can work if the points to a function that is dynamically loaded from another module?

EDIT: @bjorn3 Iโ€™m not sure you saw my question since Iโ€™ve changed to the user forum to not pollute the thread on internals

3 posts - 2 participants

Read full topic

๐Ÿท๏ธ rust_feed