From owner-freebsd-hackers Tue Dec 21 12:26: 4 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from server.baldwin.cx (ric-54.freedomnet.com [198.240.105.54]) by hub.freebsd.org (Postfix) with ESMTP id 081CC154CE for ; Tue, 21 Dec 1999 12:25:56 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from john.baldwin.cx (john [10.0.0.2]) by server.baldwin.cx (8.9.3/8.9.3) with ESMTP id PAA58860; Tue, 21 Dec 1999 15:26:06 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-Id: <199912212026.PAA58860@server.baldwin.cx> X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <5FA575D78630D3118B2E0090276DC89F01B59270@merc08.us.sas.com> Date: Tue, 21 Dec 1999 15:26:04 -0500 (EST) From: John Baldwin To: David Quattlebaum Subject: RE: modifying an object file Cc: FreeBSD Hackers Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On 21-Dec-99 David Quattlebaum wrote: > Anyone, > > I have an object file: foo.o > > In foo.o I have a call to bar(). > > Now, I want foo.o to actually call yo() instead of bar() and say I don't have > the source > for foo.c (so recompiling is out of the question). I want to change the > object file > foo.o to call yo() instead of bar(). > > Has anyone accomplished this without having to dissect the ELF object, change > it > and reconstruct the pieces? void bar(void) { yo(); } perhaps? > Thanks. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message