Date: Thu, 03 Aug 2000 11:25:27 +0100 From: Karl Pielorz <kpielorz@tdx.co.uk> To: hackers@freebsd.org Subject: LD_PRELOAD odities / Documentation? Message-ID: <39894897.79E14398@tdx.co.uk>
next in thread | raw e-mail | index | archive | help
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). Are there any problems from making syscalls / library calls from within an LD_PRELOAD'ed library? - Is anything like this documented anywhere? Most things seem to work, but calling even simply library routines such as 'strcat', 'sprintf' etc. die in flames... The wrapper I'm porting wraps a number of functions from libc (e.g. 'open', 'opendir' etc.) 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)... Thanks, -Karl To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39894897.79E14398>