converting compilers, etc. to 4.0

Dave Jones megatest!djones at decwrl.dec.com
Tue Mar 21 21:44:56 AEST 1989


We are running Sun-3.  Every now and then the subject of of possibly
switching over to 4 comes up in conversation.

I have some questions about the object (a.out) format.

We have a Pascal compiler, an assembler, and a runtime loader which we
maintain in-house, and there is a new compiler on the way. 

( We can't use the standard versions for various reasons. For example, our
Pascal supports interactive compile-load-run, sort of like LISP, Sabre-C,
etc. .. Furthermore, the new compiler has to be portable to various
platforms other than Sun. [ This all goes back to about the year 3 BS
(before Sun). Indeed, Sun obtained their first 68000 Unix sources from us.
My predecessors had ported a VAX Unix to a 68000 box that they had
designed and built here, before decent OEM workstations became available.
] )

Anyhow, all of these programs understand the Sun-3 a.out format, which is
almost exactly like 4.2BSD.

Looking over the Sun-4 documentation, it seems that the changes Sun added
to support shared libraries are compatible with the old format, except for
the a_toolversion field.  But the way relocation is done has changed
significantly. (And I can't figure out why!)

Some questions:

1. How badly will 4.0 break existing assemblers, loaders, etc.?
2. What are the snares and pitfalls?
3. Does the Sun-4 loader still like the old format?
4. Are the twenty-some-odd different relocation-types documented
   anywhere?  Example: What is RELOC_SFA_OFF13?
5. Is Sun claiming they are going to standardize on this format,
   or will COFF, SPARC, and others yet undreamed of still be confusing
   the issue?
6. If and when I modify my programs, what should they set "a_toolversion" to?
7. What have I done to deserve this? 



More information about the Comp.sys.sun mailing list