[net.micro.pc] Problem with LINK command and PASCAL

pier@ur-univax.UUCP (07/18/85)

I am trying to port a program from a VAX to an AT. The program is composed of
several modules written in PASCAL and FORTRAN, with the main module in PASCAL.
I have been able to compile all modules OK using IBM PASCAL 1.0 and IBM FORTRAN
2.0.

The problem occurs at the LINK. I get the following error several hundred (yes
indeed) tines:
Fixup offset exceeds field width in "name of module".OBJ near "address"

I get this error for all modules, every 5 or 10 bytes.
Appendix A on error messages in the DOS manual (DOS 3.0) says:
an assembler instruction refers to an address with a NEAR attribute instead
of a FAR attribute.

Since I am not using assembler, it must be something with the compiler.
I checked to make sure that the parameters passed to a procedure in a different
module are passed VARS and not VAR, so that the segment gets passed along with
the offset. Still no luck.

I tried to link each module separately. Besides the unresolved externals, I
don't get any error except for the main module.
So I get that "Fixup offset" error even when I link the main module alone.
That main module is the biggest and the PASCAL compiler generates a .OBJ file
bigger than 64K. Is that where the problem lies? Is the compiler generating
the wrong code?

Has anybody experienced this problem? Any ideas of what the problem is and maybe
how to fix it? Even if you only guess what it can be, let me know what you
think. I badly need help.



Pierre Darmon
University of ochester

{allegra|decvax|seismo}!rochester!ur-univax!pier

bright@dataio.UUCP (Walter Bright) (07/24/85)

In article <1200030@ur-univax.UUCP> pier@ur-univax.UUCP writes:
>
>I am trying to port a program from a VAX to an AT. The program is composed of
>several modules written in PASCAL and FORTRAN, with the main module in PASCAL.
>I have been able to compile all modules OK using IBM PASCAL 1.0 and IBM
>FORTRAN 2.0.
>
>The problem occurs at the LINK. I get the following error several hundred (yes
>indeed) tines:
>Fixup offset exceeds field width in "name of module".OBJ near "address"

The cause of this message is the linker finding that the difference between
two addresses in the program is greater that 64k, and so cannot be
represented in 16 bits. One cause of this can be a global identifier
that one module thinks is code and another module thinks is data. Another
cause can be linking in the wrong runtime library (such as linking in
the large model library with code that was compiled with the small model).

I would bet that IBM's Pascal and Fortran simply cannot be used together.