From owner-freebsd-hackers Fri Aug 4 1:45:52 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from karon.dynas.se (karon.dynas.se [192.71.43.4]) by hub.freebsd.org (Postfix) with SMTP id 55A5E37B967 for ; Fri, 4 Aug 2000 01:45:47 -0700 (PDT) (envelope-from mikko@dynas.se) Received: (qmail 45387 invoked from network); 4 Aug 2000 08:45:44 -0000 Received: from spirit.sto.dynas.se (HELO spirit.dynas.se) (172.16.1.10) by karon.sto.dynas.se with SMTP; 4 Aug 2000 08:45:44 -0000 Received: (qmail 4912 invoked from network); 4 Aug 2000 08:46:00 -0000 Received: from m2.dynas.se (172.16.1.168) by spirit.dynas.se with SMTP; 4 Aug 2000 08:46:00 -0000 Received: (from mikko@localhost) by m2.dynas.se (8.9.3/8.9.3) id KAA31739; Fri, 4 Aug 2000 10:46:46 +0200 (CEST) (envelope-from mikko) Date: Fri, 4 Aug 2000 10:46:46 +0200 (CEST) From: Mikko Tyolajarvi Message-Id: <200008040846.KAA31739@m2.dynas.se> To: kpielorz@tdx.co.uk Cc: freebsd-hackers@freebsd.org Subject: Re: LD_PRELOAD odities / Documentation? Newsgroups: local.freebsd-hackers References: <39894897.79E14398@tdx.co.uk> X-Newsreader: NN version 6.5.6 (NOV) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In local.freebsd-hackers you write: >Hi All, >I'm working on some code that runs fine on Linux, but not under FreeBSD... >Trying to port the code is proving to be a pain... >The code is a 'wrapper' / 'shim' that's meant to be LD_PRELOAD'ed before an >executable... I've gotten everything to compile, and the LD_PRELOAD works, but >a lot of syscall's from the wrapper library fail either with bizare messages >such as "malloc(): recursive call", or just die horibly (segmentation faults, >and all sorts). [...] >Any pointers would be greatefuly received, unfortunately this all works under >Linux (I'm not bashing anyone on the head with that, I'm far more interested >in getting it working under FreeBSD)... It used to work -- and still does on -STABLE at least. The only problem I've encountered was when the preloaded lib did not contain a dependency for libc. After adding "-lc" to the link command, things started working. $.02, /Mikko -- Mikko Työläjärvi_______________________________________mikko@rsasecurity.com RSA Security To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message