6 char externs and the ANSI standard

Geoff Kuenning geoff at desint.UUCP
Thu Nov 8 18:22:08 AEST 1984


In article <9477 at watmath.UUCP> atbowler at watmath.UUCP (Alan T. Bowler) writes:

>We all know we want long external names.  The fact remains that the
>loader format is the single hardest thing to change on a system.
>I know of one case where the loader (and its object format)
>have survived about 20 years.  There have been 3 complete rewrites
>of the operating system, but the object deck is essentially the same.
>(although in one version of the operating system the limit on names
>went from 6 to 8).  It took almost 10 years for even the Unix
>loader to allow names longer than 7 in C programs.

Harumph.  That's called lack of foresight.  I seriously doubt those 3
complete rewrites took place on a "let's rewrite the OS from scratch"
basis.  More likely it got done piece by piece.  If, when you do one piece,
you leave the hooks for longer names, over time you will have hooks in
nearly everything, and the conversion is then easy.  This is proven by the
fact that it _w_a_s possible to upgrade the limit from 6 to 8.  The
best time to do this is when you are rewriting the single hardest-to-change
part, which is usually either the loader or the part of the OS that
initiates tasks/programs/processes/jobs.

>    It is easy for people to say, "let the manufacturer write a new loader
>that handles C's long names".  There is an implicit assumption here
>that the compiler author is the manufacturer.  This is frequently
>not the case.  An independant software house writing a C compiler
>must make it work with the manufacturer's loader, or the compiler will
>simply not sell.  Supplying another loader, is also not a viable option
>we have seen this tried, and the new loader (and compiler) are dismissed
>as simply an academic exercise because it fails to provide all
>the baggage functionality that the old loader has accumulated over
>the years.

Again, harumph.  My employer gets most of its sales from the fact that our
linker provides all the ugly features you find on Intel's.  While our C
compiler must work reasonably well with the Intel loader, it is perfectly
acceptable in my opinion to have a switch that says "produce old-style
object modules" to achieve that goal.

>(the suggestion about a post compiling step that remaps names
> falls on its face on any reasonable sized program (200-400
> routines spread over as many source files.)

Why?  Don't think of it as a post-compiling step, think of it as a
pre-linking step.  Big difference in binding times.

-- 

	Geoff Kuenning
	First Systems Corporation
	...!ihnp4!trwrb!desint!geoff



More information about the Comp.lang.c mailing list