From owner-freebsd-current Fri Nov 14 18:27:21 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id SAA22985 for current-outgoing; Fri, 14 Nov 1997 18:27:21 -0800 (PST) (envelope-from owner-freebsd-current) Received: from picnic.mat.net (picnic.mat.net [206.246.122.117]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id SAA22980 for ; Fri, 14 Nov 1997 18:27:16 -0800 (PST) (envelope-from chuckr@glue.umd.edu) Received: from localhost (chuckr@localhost) by picnic.mat.net (8.8.7/8.8.5) with SMTP id UAA06287 for ; Fri, 14 Nov 1997 20:23:42 -0500 (EST) X-Authentication-Warning: picnic.mat.net: chuckr owned process doing -bs Date: Fri, 14 Nov 1997 20:23:37 -0500 (EST) From: Chuck Robey X-Sender: chuckr@picnic.mat.net To: FreeBSD-current@FreeBSD.org Subject: using pthreads Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk In doing a pthreads applicatioin, under current, I'm not sure how to do the linking part. My libc_r is up to date and installed, but there are many functions, that aren't strictly pthread_* functions, that have been made thread-safe in the libc_r library, so I want that library to link before libc. I'm not sure how to do that. I tried using a linker line of -shared -nostdlib -lc_r -lc, but I got the error "Exec format error. Binary file not executable" when I tried to run the file. If I cut out the -nostdlib and -shared, it tells me there's not __DYNAMIC, so I guess it wasn't linked shared. File tells me the file is a FreeBSD/i386 compact demand paged shared library not stripped, so that looks ok to me. Does anyone know the correct way to link a pthread app under FreeBSD? ----------------------------+----------------------------------------------- Chuck Robey | Interests include any kind of voice or data chuckr@glue.umd.edu | communications topic, C programming, and Unix. 213 Lakeside Drive Apt T-1 | Greenbelt, MD 20770 | I run Journey2 and picnic, both FreeBSD (301) 220-2114 | version 3.0 current -- and great FUN! ----------------------------+-----------------------------------------------