Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!ucbvax!ucbarpa.Berkeley.EDU!edward From: edward@ucbarpa.Berkeley.EDU (Edward Wang) Newsgroups: comp.lang.c Subject: Re: OK, so why _does_ ld resolve text against data? Message-ID: <38448@ucbvax.BERKELEY.EDU> Date: 27 Aug 90 01:41:54 GMT References: <37909@ucbvax.BERKELEY.EDU> <930@eplunix.UUCP> <3274@skye.ed.ac.uk> <13658@smoke.BRL.MIL> Sender: usenet@ucbvax.BERKELEY.EDU Reply-To: edward@ucbarpa.Berkeley.EDU.UUCP (Edward Wang) Organization: University of California, Berkeley Lines: 17 In article <13658@smoke.BRL.MIL> gwyn@smoke.BRL.MIL (Doug Gwyn) writes: >In article <3274@skye.ed.ac.uk> richard@aiai.UUCP (Richard Tobin) writes: >> On the other hand, it can be useful to be able to replace a library >> routine and have other library routines use your version. > >I absolutely do not recommend this. Implementations of the system >library may well have internal constraints that the application >programmer is unaware of, and replacing a library function can result >in obscure, sometimes subtle, malfunctions. However it is an essential feature of C. Redefining library functions is a time-honored C tradition. Many things depend on it, for example Ben Zorn's memory profiler that was so well received at Usenix a few years ago. I don't recommend doing this lightly either. In Lisp, it's possible to redefine car and cdr, but getting it to work is harder.