<s>
The	O
GOFF	B-Application
(	O
Generalized	O
Object	O
File	O
Format	O
)	O
specification	O
was	O
developed	O
for	O
IBM	O
's	O
MVS	B-Application
operating	I-Application
system	I-Application
to	O
supersede	O
the	O
IBM	B-Application
OS/360	I-Application
Object	O
File	O
Format	O
to	O
compensate	O
for	O
weaknesses	O
in	O
the	O
older	O
format	O
.	O
</s>
<s>
The	O
original	O
IBM	B-Application
OS/360	I-Application
Object	O
File	O
Format	O
was	O
developed	O
in	O
1964	O
for	O
the	O
new	O
IBM	B-Application
System/360	I-Application
mainframe	O
computer	O
.	O
</s>
<s>
The	O
format	O
was	O
also	O
used	O
by	O
makers	O
of	O
plug	O
compatible	O
and	O
workalike	O
mainframes	O
,	O
including	O
the	O
Univac	B-Device
90/60	I-Device
,	I-Device
90/70	I-Device
and	I-Device
90/80	I-Device
and	O
Fujitsu	O
B2800	O
.	O
</s>
<s>
While	O
this	O
helped	O
,	O
it	O
did	O
not	O
provide	O
for	O
the	O
enhanced	O
information	O
necessary	O
for	O
today	O
's	O
more	O
complicated	O
programming	O
languages	O
and	O
more	O
advanced	O
features	O
such	O
as	O
objects	O
,	O
properties	O
and	O
methods	O
,	O
Unicode	O
support	O
,	O
and	O
virtual	B-Application
methods	I-Application
.	O
</s>
<s>
The	O
GOFF	B-Application
object	O
file	O
format	O
was	O
developed	O
by	O
IBM	O
approximately	O
in	O
1995	O
as	O
a	O
means	O
to	O
overcome	O
these	O
problems	O
.	O
</s>
<s>
The	O
earliest	O
mention	O
of	O
this	O
format	O
was	O
in	O
the	O
introductory	O
information	O
about	O
the	O
new	O
High	O
Level	O
Assembler	B-Language
.	O
</s>
<s>
Note	O
that	O
the	O
OS/360	O
Object	O
File	O
Format	O
was	O
simply	O
superseded	O
by	O
the	O
GOFF	B-Application
format	O
,	O
it	O
was	O
not	O
deprecated	O
,	O
and	O
is	O
still	O
in	O
use	O
by	O
assemblers	B-Language
and	O
language	O
compilers	O
where	O
the	O
language	O
can	O
withstand	O
the	O
limitations	O
of	O
the	O
older	O
format	O
.	O
</s>
<s>
This	O
article	O
will	O
use	O
the	O
term	O
"	O
module	O
"	O
to	O
refer	O
to	O
any	O
name	O
or	O
equivalent	O
symbol	O
,	O
which	O
is	O
used	O
to	O
provide	O
an	O
identifier	O
for	O
a	O
piece	O
of	O
code	O
or	O
data	O
external	O
to	O
the	O
scope	B-Language
to	O
which	O
it	O
is	O
referenced	O
.	O
</s>
<s>
A	O
module	O
may	O
refer	O
to	O
a	O
subroutine	O
,	O
a	O
function	O
,	O
Fortran	B-Application
Common	O
or	O
Block	O
Data	O
,	O
an	O
object	O
or	O
class	O
,	O
a	O
method	O
or	O
property	O
of	O
an	O
object	O
or	O
class	O
,	O
or	O
any	O
other	O
named	O
routine	O
or	O
identifier	O
external	O
to	O
that	O
particular	O
scope	B-Language
referencing	O
the	O
external	O
name	O
.	O
</s>
<s>
The	O
terms	O
"	O
assembler	B-Language
"	O
for	O
a	O
program	O
that	O
converts	O
assembly	B-Language
language	I-Language
to	O
machine	O
code	O
,	O
as	O
well	O
as	O
as	O
the	O
process	O
of	O
using	O
one	O
,	O
and	O
as	O
the	O
process	O
of	O
using	O
a	O
"	O
compiler	O
,	O
"	O
which	O
does	O
the	O
same	O
thing	O
for	O
high-level	O
languages	O
,	O
should	O
,	O
for	O
the	O
purposes	O
of	O
this	O
article	O
.	O
</s>
<s>
be	O
considered	O
interchangeable	O
;	O
thus	O
where	O
"	O
compile	O
"	O
and	O
"	O
compiler	O
"	O
are	O
used	O
,	O
substitute	O
"	O
assemble	O
"	O
and	O
"	O
assembler	B-Language
"	O
as	O
needed	O
.	O
</s>
<s>
When	O
necessary	O
to	O
express	O
a	O
number	O
in	O
hexadecimal	O
,	O
the	O
standard	O
mainframe	O
assembler	B-Language
format	O
of	O
using	O
the	O
capital	O
letter	O
X	O
preceding	O
the	O
number	O
,	O
expressing	O
any	O
hexadecimal	O
letters	O
in	O
the	O
number	O
in	O
upper	O
case	O
,	O
and	O
enclosing	O
the	O
number	O
in	O
single	O
quotes	O
,	O
e.g.	O
</s>
<s>
A	O
"	O
byte	O
"	O
as	O
used	O
in	O
this	O
article	O
,	O
is	O
8-bits	O
,	O
and	O
unless	O
otherwise	O
specified	O
,	O
a	O
"	O
byte	O
"	O
and	O
a	O
"	O
character	O
"	O
are	O
the	O
same	O
thing	O
;	O
characters	O
in	O
EBCDIC	B-Language
are	O
also	O
8-bit	O
.	O
</s>
<s>
GOFF	B-Application
files	O
are	O
either	O
fixed	O
-	O
or	O
variable-length	O
records	O
.	O
</s>
<s>
A	O
GOFF	B-Application
record	O
must	O
completely	O
fit	O
within	O
a	O
single	O
record	O
of	O
the	O
underlying	O
file	O
system	O
.	O
</s>
<s>
A	O
GOFF	B-Application
file	O
is	O
not	O
a	O
stream-type	O
file	O
.	O
</s>
<s>
The	O
program	O
reading	O
(	O
or	O
writing	O
)	O
GOFF	B-Application
records	O
is	O
not	O
to	O
make	O
assumptions	O
about	O
the	O
internal	O
format	O
of	O
records	O
,	O
the	O
operating	B-General_Concept
system	I-General_Concept
is	O
presumed	O
to	O
be	O
able	O
to	O
provide	O
fixed	O
-	O
or	O
variable-length	O
records	O
without	O
the	O
program	O
reading	O
them	O
needing	O
to	O
be	O
aware	O
of	O
the	O
operating	B-General_Concept
system	I-General_Concept
internal	O
file	O
management	O
.	O
</s>
<s>
Fixed-length	O
records	O
are	O
required	O
for	O
GOFF	B-Application
files	O
deployed	O
on	O
Unix	B-Application
systems	I-Application
.	O
</s>
<s>
A	O
GOFF	B-Application
object	O
file	O
starts	O
with	O
an	O
HDR	O
record	O
and	O
ends	O
with	O
an	O
END	O
record	O
.	O
</s>
<s>
The	O
END	O
record	O
should	O
include	O
the	O
number	O
of	O
GOFF	B-Application
records	O
(	O
not	O
the	O
number	O
of	O
physical	O
records	O
)	O
in	O
the	O
file	O
.	O
</s>
<s>
A	O
language	O
compiler	O
or	O
assembler	B-Language
can	O
produce	O
multiple	O
GOFF	B-Application
files	O
in	O
one	O
compilation/assembly	O
,	O
but	O
the	O
individual	O
GOFF	B-Application
files	O
must	O
be	O
separate	O
from	O
each	O
other	O
.	O
</s>
<s>
A	O
module	O
named	O
"	O
exit	O
"	O
(	O
as	O
used	O
by	O
the	O
C	B-Language
language	I-Language
)	O
need	O
not	O
be	O
the	O
same	O
as	O
"	O
EXIT	O
"	O
used	O
by	O
the	O
Fortran	B-Application
language	I-Application
.	O
</s>
<s>
Some	O
conventions	O
applicable	O
to	O
the	O
OS/360	O
Object	O
File	O
Format	O
are	O
carried	O
over	O
to	O
the	O
GOFF	B-Application
Object	O
File	O
Format	O
,	O
including	O
:	O
</s>
<s>
Unless	O
otherwise	O
specified	O
,	O
all	O
characters	O
are	O
in	O
the	O
EBCDIC	B-Language
character	O
set	O
,	O
except	O
for	O
external	O
names	O
,	O
as	O
stated	O
below	O
.	O
</s>
<s>
ESD	O
items	O
(	O
Main	O
programs	O
,	O
subroutines	O
,	O
functions	O
,	O
FORTRAN	B-Application
Common	O
,	O
methods	O
and	O
properties	O
in	O
objects	O
)	O
must	O
be	O
numbered	O
starting	O
with	O
1	O
and	O
each	O
new	O
item	O
is	O
to	O
have	O
the	O
next	O
number	O
in	O
sequence	O
,	O
without	O
any	O
'	O
gaps	O
 '	O
in	O
the	O
numbering	O
sequence	O
.	O
</s>
<s>
Character	O
sets	O
used	O
for	O
external	O
names	O
are	O
not	O
defined	O
by	O
the	O
GOFF	B-Application
standard	O
,	O
but	O
there	O
is	O
a	O
provision	O
for	O
a	O
file	O
to	O
indicate	O
what	O
character	O
set	O
is	O
being	O
used	O
.	O
</s>
<s>
Some	O
IBM	O
products	O
,	O
however	O
,	O
only	O
allow	O
characters	O
for	O
external	O
names	O
and	O
other	O
identifiers	O
to	O
a	O
restricted	O
range	O
,	O
typically	O
(	O
EBCDIC	B-Language
)	O
hexadecimal	O
values	O
of	O
X'41'	O
through	O
X'FE'	O
plus	O
the	O
shift-in	O
and	O
shift	O
out	O
characters	O
,	O
X'0F'	O
and	O
X'0E'	O
,	O
respectively	O
.	O
</s>
<s>
The	O
SYM	O
object	O
file	O
symbolic	O
table	O
information	O
from	O
the	O
360	O
Object	O
File	O
format	O
record	O
is	O
not	O
available	O
for	O
GOFF	B-Application
object	O
files	O
;	O
the	O
ADATA	O
record	O
(	O
sub-record	O
to	O
TXT	O
)	O
must	O
be	O
used	O
instead	O
.	O
</s>
<s>
ESD	O
records	O
define	O
main	O
programs	O
,	O
subroutines	O
,	O
functions	O
,	O
dummy	O
sections	O
,	O
Fortran	B-Application
Common	O
,	O
methods	O
and	O
properties	O
,	O
and	O
any	O
module	O
or	O
routine	O
that	O
can	O
be	O
called	O
by	O
another	O
module	O
.	O
</s>
<s>
They	O
are	O
used	O
to	O
define	O
the	O
program(s )	O
or	O
program	O
segments	O
that	O
were	O
compiled	O
in	O
this	O
execution	O
of	O
the	O
compiler	O
,	O
and	O
external	O
routines	O
used	O
by	O
the	O
program	O
(	O
such	O
as	O
exit( )	O
in	O
C	B-Language
,	O
CALL	O
EXIT	O
in	O
Fortran	B-Application
;	O
new( )	O
and	O
dispose( )	O
in	O
Pascal	B-Application
)	O
.	O
</s>
<s>
GOFF	B-Application
records	O
may	O
be	O
fixed	O
or	O
variable	O
length	O
;	O
the	O
minimum	O
length	O
when	O
using	O
variable-length	O
records	O
is	O
56	O
characters	O
,	O
although	O
most	O
records	O
will	O
be	O
longer	O
than	O
this	O
.	O
</s>
<s>
Except	O
for	O
module	O
and	O
class	O
names	O
,	O
all	O
characters	O
are	O
in	O
the	O
EBCDIC	B-Language
character	O
set	O
.	O
</s>
<s>
Unix-based	O
systems	O
must	O
use	O
fixed-length	O
(	O
80-byte	O
)	O
records	O
.	O
</s>
<s>
To	O
distinguish	O
GOFF	B-Application
records	O
from	O
the	O
older	O
OS/360	O
object	O
format	O
(	O
where	O
the	O
first	O
byte	O
of	O
a	O
record	O
is	O
X'02'	O
)	O
or	O
from	O
commands	O
that	O
may	O
be	O
present	O
in	O
the	O
file	O
,	O
the	O
first	O
byte	O
of	O
each	O
GOFF	B-Application
record	O
is	O
always	O
the	O
binary	O
value	O
X'03'	O
,	O
while	O
commands	O
must	O
start	O
with	O
a	O
character	O
value	O
of	O
at	O
least	O
space	O
(	O
X'40'	O
)	O
.	O
</s>
<s>
The	O
next	O
2	O
bytes	O
of	O
a	O
GOFF	B-Application
record	O
indicate	O
the	O
record	O
type	O
,	O
continuation	O
and	O
version	O
of	O
the	O
file	O
format	O
.	O
</s>
<s>
The	O
PTV	O
field	O
represents	O
the	O
first	O
3	O
bytes	O
of	O
every	O
GOFF	B-Application
record	O
.	O
</s>
<s>
+	O
PTV	O
FieldByteBitsValue	O
Purpose0All03Indicates	O
start	O
of	O
a	O
GOFF	B-Application
record10-30ESD	O
(	O
External	O
Symbol	O
)	O
record	O
1TXT	O
(	O
Text	O
)	O
record	O
2RLD	O
(	O
Relocation	O
)	O
record	O
3LEN	O
(	O
Length	O
)	O
record	O
4END	O
(	O
End	O
)	O
record	O
X'5'-X'E'ReservedX'F'HDR	O
(	O
Header	O
)	O
record	O
4-5Reserved6-700Initial	O
record	O
that	O
is	O
not	O
continued	O
on	O
the	O
next	O
record	O
.	O
</s>
<s>
This	O
should	O
be	O
the	O
only	O
value	O
used	O
for	O
variable-length	O
GOFF	B-Application
records01Initial	O
record	O
which	O
is	O
continued	O
on	O
next	O
record10Continuation	O
record	O
not	O
continued	O
on	O
next	O
record11Continuation	O
record	O
which	O
is	O
continued	O
on	O
the	O
next	O
record2All00Version	O
Number	O
of	O
the	O
object	O
file	O
format	O
.	O
</s>
<s>
An	O
ESD	O
record	O
gives	O
the	O
public	O
name	O
for	O
a	O
module	O
,	O
a	O
main	O
program	O
,	O
a	O
subroutine	O
,	O
procedure	O
,	O
function	O
,	O
property	O
or	O
method	O
in	O
an	O
object	O
,	O
Fortran	B-Application
Common	O
or	O
alternate	O
entry	O
point	O
.	O
</s>
<s>
Also	O
used	O
for	O
Fortran	B-Application
Common.01	O
ED	O
-	O
External	O
Definition	O
.	O
</s>
<s>
If	O
the	O
actual	O
length	O
value	O
is	O
deferred	O
;	O
this	O
value	O
is	O
set	O
to	O
-1.28-314Extended	O
Attribute	O
ESDIDBinaryESDID	O
of	O
element	O
that	O
contains	O
extended	O
attribute	O
information	O
for	O
ED	O
and	O
LD	O
types	O
;	O
typically	O
used	O
where	O
DLLs	O
are	O
supported	O
for	O
symbols	O
which	O
are	O
resolved	O
at	O
run	O
time	O
(	O
like	O
virtual	B-Application
methods	I-Application
)	O
.	O
</s>
<s>
Strong	O
Definitions	O
can	O
be	O
resolved	O
to	O
any	O
reference	O
;	O
this	O
is	O
the	O
default.0000Strong0001Weak510-1	O
(	O
2	O
)	O
Class	O
Loading	O
BehaviorDetermines	O
whether	O
the	O
elements	O
of	O
a	O
class	O
will	O
be	O
loaded	O
in	O
the	O
case	O
of	O
an	O
Operating	B-General_Concept
System	I-General_Concept
LOAD	O
request	O
is	O
used	O
with	O
respect	O
to	O
an	O
object00LOAD	O
-	O
Load	O
this	O
class	O
01DEFERRED	O
LOAD	O
-	O
This	O
class	O
will	O
probably	O
be	O
used	O
and	O
should	O
be	O
loaded10NOLOAD	O
-	O
Do	O
not	O
load	O
this	O
class11Reserved2Common	O
FlagIf	O
1	O
,	O
treat	O
as	O
"	O
old	O
"	O
CM-type	O
COMMON	O
where	O
multiple	O
references	O
set	O
the	O
size	O
to	O
the	O
largest	O
area	O
being	O
used	O
by	O
any	O
reference	O
.	O
</s>
<s>
+	O
ADATA	O
record	O
typesTYpeDescriptionTranslator	O
records	O
(	O
note	O
that	O
some	O
values	O
in	O
the	O
range	O
0-X	O
'	O
0130	O
 '	O
are	O
in	O
use	O
by	O
some	O
IBM	O
language	O
translator	O
products	O
including	O
Assembler	B-Language
,	O
Cobol	B-Application
and	O
PL/I	B-Language
)	O
.Program	O
Management	O
recordsReservedReserved	O
for	O
compilers	O
and	O
assemblers	B-Language
not	O
released	O
by	O
IBM.Available	O
for	O
User	O
Records	O
.	O
</s>
<s>
The	O
IDR	O
Table	O
,	O
which	O
is	O
located	O
starting	O
at	O
byte	O
24	O
of	O
the	O
TXT	O
record	O
,	O
identifies	O
the	O
compiler	O
or	O
assembler	B-Language
(	O
and	O
its	O
version	O
number	O
)	O
that	O
created	O
this	O
object	O
file	O
.	O
</s>
<s>
+	O
Format	O
1	O
(	O
old	O
format	O
)	O
Byte(s )	O
SizeFieldValue	O
Purpose0-910TranslatorAny	O
textThis	O
value	O
is	O
what	O
the	O
assembler	B-Language
or	O
compiler	O
identifies	O
itself	O
as	O
;	O
IBM	O
calls	O
this	O
the	O
"	O
PID	O
value	O
"	O
or	O
"	O
Program	O
ID	O
value	O
"	O
from	O
IBM	O
's	O
catalog	O
numbers	O
of	O
various	O
programs	O
,	O
e.g.	O
</s>
<s>
the	O
Cobol	B-Application
Compiler	O
for	O
OS/VS1	O
is	O
called	O
"	O
IKFCBL00	O
"	O
10-112Versiontwo	O
digitsThis	O
is	O
the	O
version	O
number	O
of	O
the	O
assembler	B-Language
or	O
compiler	O
,	O
0	O
to	O
99	O
.	O
</s>
<s>
Normally	O
compilers	O
and	O
assemblers	B-Language
do	O
not	O
generate	O
this	O
format	O
record	O
,	O
it	O
is	O
typically	O
created	O
by	O
the	O
binder	O
.	O
</s>
<s>
 [ C ] 	O
If	O
R_Pointer	O
,	O
P_Pointer	O
,	O
or	O
Offset	O
(	O
bit	O
2	O
of	O
byte	O
0	O
of	O
Flags	O
field	O
is	O
1	O
)	O
are	O
omitted	O
,	O
this	O
field	O
starts	O
4	O
bytes	O
lower	O
.	O
</s>
<s>
To	O
clarify	O
,	O
if	O
a	O
module	O
in	O
a	O
C	B-Language
program	I-Language
named	O
"	O
Basura	O
"	O
was	O
to	O
issue	O
a	O
call	O
to	O
the	O
"	O
exit	O
"	O
function	O
to	O
terminate	O
itself	O
,	O
the	O
R_Pointer	O
address	O
would	O
be	O
the	O
ESDID	O
of	O
the	O
routine	O
"	O
exit	O
"	O
while	O
the	O
P_Pointer	O
would	O
be	O
the	O
ESDID	O
of	O
"	O
Basura	O
"	O
.	O
</s>
<s>
This	O
is	O
used	O
either	O
because	O
the	O
program	O
has	O
non-executable	O
data	O
appearing	O
before	O
the	O
start	O
of	O
the	O
module	O
(	O
very	O
common	O
for	O
older	O
assembly	O
programmers	O
,	O
as	O
older	O
versions	O
of	O
the	O
assembler	B-Language
were	O
much	O
slower	O
to	O
assemble	O
data	O
stored	O
in	O
programs	O
once	O
instructions	O
were	O
specified	O
)	O
,	O
or	O
because	O
the	O
module	O
calls	O
an	O
external	O
module	O
first	O
,	O
such	O
as	O
a	O
run-time	O
library	O
to	O
initialize	O
itself	O
.	O
</s>
<s>
FieldOffsetSizeBitsDescriptionPTV0-23X	O
'	O
034000	O
 '	O
-	O
Not-continuedX	O
'	O
034100	O
 '	O
-	O
Continued	O
on	O
next	O
record30-56ReservedFlags6-72Declarations	O
regarding	O
the	O
presence	O
or	O
absence	O
of	O
an	O
entry	O
point	O
00	O
-	O
No	O
entry	O
point	O
given	O
;	O
all	O
other	O
values	O
in	O
this	O
record	O
are	O
invalid01	O
-	O
Entry	O
point	O
specified	O
by	O
ESDID10	O
-	O
Entry	O
point	O
specified	O
by	O
name11	O
-	O
ReservedAMODE41Addressing	O
Mode	O
value	O
of	O
entry	O
point	O
;	O
the	O
values	O
are	O
as	O
specified	O
in	O
field	O
0	O
of	O
the	O
Behavior	O
Attributes	O
table	O
in	O
the	O
ESD	O
record.5-73ReservedRecord	O
Count8-114Number	O
of	O
GOFF	B-Application
records	O
in	O
this	O
module	O
(	O
this	O
is	O
the	O
number	O
of	O
"	O
logical	O
"	O
records	O
,	O
i.e.	O
</s>
