force symbols for inline functions to be addressed at a particular library

Peter McAlpine petermca@gmail.com
Fri Sep 28 22:52:00 GMT 2007


John,

On 9/28/07, John Love-Jensen <eljay@adobe.com> wrote:
> Hi Peter,
>
> > Sorry to re-post, but does anyone have suggestions on how to force g++
> > to link against libc for 'stat' symbol instead of using the weak
> > symbol from my shared library?
>
> I'd do it by changing the name of your symbol in your shared library from
> stat to mystat.

I'm afraid I can't do this because the stat symbol in question is
actually the weak symbol stat symbol of the inline'd libc function...!

> Or do it dynamically by using dlopen and opening the libc.so explicitly and
> accessing the stat routine explicitly.

I may try this.

Thanks for your response,
-Peter



More information about the Gcc-help mailing list