restrictive linkers (was: Reserved names in ANSI C)

Steve Summit scs at adam.pika.mit.edu
Sun Jul 16 15:35:33 AEST 1989


Two minor points:

In article <547 at cybaswan.UUCP> iiit-sh at cybaswan.UUCP (Steve Hosgood) writes:
>In article <2619 at yunexus.UUCP>, davecb at yunexus.UUCP (David Collier-Brown) writes:
>> 0) 6 characters is a lower limit of significance. You're allowed to use more.
>Yeah, but though you may be able to use more, a 'strictly conforming' program
>can't, otherwise it won't port to sites with 6-character linkers.

Presumably the posters and most readers of this group understand
it, but there are apparently many who interpret statements like
the above to mean that external identifiers may not have more
than six characters at all.  I'm always seeing subroutine
packages that have incredibly strained, abbreviated identifier
names, to keep them six characters long.  You're allowed to use
extra characters for readability; the only problem is that if you
say

	int identifier1, identifier2;

you may get

	"identi: multiply defined."

It should be perfectly legal to say

	int identifier, anotheridentifier;

>If Ada becomes important due to the
>military backing, can't 'C' ride its wake (so to speak) and insist on a
>linker with sensible namewidth?

I believe X3J11 is on record as strongly encouraging better
linkers, and indicating that the six-character significance limit
is likely to disappear in future revisions.  (Happily, this would
be a backwards-compatible change, except for programs with
typoes.)  No one (not even the maintainers of the systems that
have them) likes the situation with respect to old-fashioned
linkers.  However, the compromise had to be made to ensure a
standard that could and would be used.

                                            Steve Summit
                                            scs at adam.pika.mit.edu

P.S. I think that ADA places much more complicated demands on a
linker than simply that it have more than six characters' worth
of significance.  (That is, ADA tends to require a new linker
anyway, not just for longer names.)  Every ADA implementation
I've seen (not many) comes with its own linker, at least
partially superseding the operating system's default one, even on
systems such as VMS which already have remarkably powerful
standard linkers and object file formats.  A language that
supports object/package/cluster concepts typically requires
complicated name resolution and binding in the link phase which
many (most) existing linkers simply aren't equipped to do.
(C++ has the same problem.)



More information about the Comp.std.c mailing list