Weak symbols not found by loaded code

Patrick Gauvin pggauvin at gmail.com
Tue May 17 19:14:09 UTC 2016


Thank you Joel, I've opened a ticket here:
https://devel.rtems.org/ticket/2704

Sorry for the slow response, I saw your response on the archives earlier
but just found the email in my spam folder.

-Patrick

On Tue, May 10, 2016 at 9:37 AM, Joel Sherrill <joel at rtems.org> wrote:

>
> On May 10, 2016 1:56 AM, "Patrick Gauvin" <pggauvin at gmail.com> wrote:
> >
> > Hello,
> >
> > I stumbled across this while trying to load C++ code using libdl. If a
> > symbol is weakly defined in the base image and used in the loaded
> > code, the loaded code is unable to find it. It is my understanding
> > that if there is not a globally exported version of the symbol, the
> > weak version will be globally available. Is this correct? Or is there
> > a special procedure I need to use for this situation?
> >
> > I made a test case in pure C and I see the same behavior. If the
> > symbol is weak and only present in the base image, it is not found and
> > left unresolved. However, if the weak symbol is overrode by a symbol
> > in the loaded code (weak or not), the symbol is resolved and the
> > loaded code works. I can provide the test source if requested, I'm
> > just out of time for tonight.
>
> I lean to this being a bug on an untested case. If you can prepare a test
> case and file a ticket, then Chris can take a look at it.
>
> I am pretty sure the existing dl tested don't exercise this case.
>
> --joel
>
> > Thank you,
> >
> > -Patrick
> > _______________________________________________
> > users mailing list
> > users at rtems.org
> > http://lists.rtems.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20160517/afb3862f/attachment-0002.html>


More information about the users mailing list