_why_ does the UNIX linker not distinguish text and data addresses???

Doug Gwyn gwyn at smoke.BRL.MIL
Thu Aug 2 00:01:58 AEST 1990


In article <1990Jul30.104726.22660 at mtcchi.uucp> levy at mtcchi.UUCP (Daniel R. Levy) writes:
>Now my question is, why does the linker silently resolve the function reference
>to the global variable without even a whisper of a warning?

The original UNIX linker "ld", written I think by Dennis Ritchie,
was remarkably simple compared to typical system linkers.  This
has since been fixed in UNIX System V COFF-based systems.

>Yes I know this is a stupid thing to do, I'm just asking hypothetically.

UNIX was never designed to keep people from doing stupid things,
because that policy would also keep them from doing clever things.



More information about the Comp.unix.wizards mailing list