In an rlib, all publicly reachable symbols will be exported from the
object, for example:


    mod foo { pub static BAR: int = 3; }

That symbol is not exported because BAR is not reachable from the outside world.

    pub use foo::BAR;
    mod foo { pub static BAR: int = 3; }

This time, BAR will be an exported symbol because it is publicly
reachable (you could also make 'foo' public).

Would that help your use case, or are you thinking of something more complex?

On Wed, Apr 30, 2014 at 6:49 AM, Vladimir Pouzanov <[email protected]> wrote:
> I have the following setup:
>
>   libzinc, compiles as rlib, provides all the stuff
>   support, compiles as obj, provides __morestack, memset/memcpy and other
> required things
>   libapp, compiles as staticlib emitting obj, depends on libzinc, builds
> with lto.
>
> I link libapp.o and support.o to get the final binary.
>
> Now, to make multitasking work, I need to move __morestack into libzinc, so
> that I can access task API from the function. The problem is that publicly
> visible __morestack in libzinc is not visible from libapp, which requires it
> implicitly via function prologues. Other static symbols (like __STACK_LIMIT)
> are not available as well.
>
> Is there any way to promote the visibility of symbols from libzinc to libapp
> in this case?
>
> --
> Sincerely,
> Vladimir "Farcaller" Pouzanov
> http://farcaller.net/
>
> _______________________________________________
> Rust-dev mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/rust-dev
>
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to