This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tree-ssa -fmudflap problems


On Thu, Apr 03, 2003 at 12:10:28AM +1000, Eyal Lebedinsky wrote:
> I decided to try and get my system to first base. I created a small
> header and function that loads all the required pthread_ functions
> (dlopen/sym) into a structure, and then (using some #defines)
> replaces all pthread_XXX() calls with a call through the structure,
> like this
> 	(*my_struct.my_pthread_XXX)()
> 
> All I changed was replacing
> 	#include <pthread.h>
> with
> 	#include "pt.h"
> where needed, and added a call at system initialisation to the
> library load function that populates the structure.
> 
> This should remove all dependency on -lpthread. It did not. Not
> only did I find my executables having a dependency (ldd) on
> libpthread.so, but the programs fails (a stack overflow) on the first
> dlopen("/usr/lib/libpthread.so").
> 
> Is there an internal dependency that gcc inserts somehow? I did not
> include <pthread.h> and did not mention any of pthread_ function.

You can not use libpthread in this fashion; it _must_ be linked to
normally.  I'm guessing that you're using glibc, from context.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]