This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: force symbols for inline functions to be addressed at a particular library
- From: John Love-Jensen <eljay at adobe dot com>
- To: <peter at aoeu dot ca>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Fri, 28 Sep 2007 11:51:32 -0500
- Subject: Re: force symbols for inline functions to be addressed at a particular library
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.
Or do it dynamically by using dlopen and opening the libc.so explicitly and
accessing the stat routine explicitly.
HTH,
--Eljay