Doug Gwyn <gwyn> gwyn at brl-tgr.ARPA
Fri Jan 10 06:03:25 AEST 1986

The fellow with the "truncated" archive name probably has the
following trouble.

Note first that the linker does NOT use archive member (file)
names to resolve extern references; it uses global entry points.
In older UNIXes, these were found by sequentially scanning all
object members of the archive; in newer versions, the archive
contains a member that is a index of entry points.

For the reported problem, the fellow's current compiler must
support long names (FLEXNAMES, or at least longer-than-before
names), and the member of the archive must date back to pre-
long-names times, when all extern names were truncated to fit
the limited space available in the object module format (by
the assembler, not by the archiver).

Because there is no way for the newer SGS to know that an older
entry point name resulted from the truncation of something
longer, existing names are taken as exactly what they contain.
Long names compiled by the newer SGS will have their full names.
These will not match the older truncated forms.

You can work around this, assuming you can't just recompile the
archive member from its source, by replacing the long names in
you current source by their short versions.  An easy way to do
this is:
	#define	nametoolong nametool
(or whatever) at the beginning of the source file.
AT&T SVR2 cpp is supposed to have a "truncate" option, -T, to
do this for you automatically.

More information about the Comp.lang.c mailing list