AIX 3.1 versus C++

Benson I. Margulies benson at odi.com
Wed Oct 31 02:07:40 AEST 1990


I'm trying to bring up CFRONT 2.1 from AT&T.

I'm having troubles with XCOFF.

C++ comes with a program named "patch". It searches the executable
using libld for static structures named "__link", and patches
the executable to assemble them into a linked list.

Well, first of all, these statics tend to disappear from my executables
and even the .o's unless I crockily force them to be referenced.
Is there some magic someone knows to force an unreferenced static item
to be preserved?

When I preserved them by forcing them to be referenced global symbols,
I was surprisedt to find each one occuring in the object file twice:
once with n_sclass of C_EXT, and one with C_HIDEXT.

Using either of these definitions, the "standard" coff technique
of patching to establish the linked list malfunctions, apparently
running afoul of relocation problems.

Has anyone been here before? Is there perhaps a feature of XCOFF, as in ELF,
that would allow one to register code to run at the beginning of an
execution without any of this crazyness?

-- 
Benson I. Margulies



More information about the Comp.unix.aix mailing list