OK, so why _does_ ld resolve text against data?

Edward Wang edward at ucbarpa.Berkeley.EDU
Mon Aug 27 11:41:54 AEST 1990


In article <13658 at smoke.BRL.MIL> gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
>In article <3274 at skye.ed.ac.uk> richard at 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.



More information about the Comp.lang.c mailing list