<s>
An	O
object	B-Application
file	I-Application
is	O
a	O
computer	O
file	O
containing	O
object	B-Language
code	I-Language
,	O
that	O
is	O
,	O
machine	B-Language
code	I-Language
output	O
of	O
an	O
assembler	B-Application
or	O
compiler	B-Language
.	O
</s>
<s>
The	O
object	B-Language
code	I-Language
is	O
usually	O
relocatable	B-Library
,	O
and	O
not	O
usually	O
directly	O
executable	B-Application
.	O
</s>
<s>
There	O
are	O
various	O
formats	O
for	O
object	B-Application
files	I-Application
,	O
and	O
the	O
same	O
machine	B-Language
code	I-Language
can	O
be	O
packaged	O
in	O
different	O
object	B-Application
file	I-Application
formats	I-Application
.	O
</s>
<s>
An	O
object	B-Application
file	I-Application
may	O
also	O
work	O
like	O
a	O
shared	O
library	B-Library
.	O
</s>
<s>
In	O
addition	O
to	O
the	O
object	B-Language
code	I-Language
itself	O
,	O
object	B-Application
files	I-Application
may	O
contain	O
metadata	O
used	O
for	O
linking	B-Application
or	O
debugging	O
,	O
including	O
:	O
information	O
to	O
resolve	O
symbolic	O
cross-references	O
between	O
different	O
modules	O
,	O
relocation	B-Library
information	I-Library
,	O
stack	O
unwinding	O
information	O
,	O
comments	O
,	O
program	O
symbols	O
,	O
debugging	O
or	O
profiling	O
information	O
.	O
</s>
<s>
Other	O
metadata	O
may	O
include	O
the	O
date	O
and	O
time	O
of	O
compilation	B-Language
,	O
the	O
compiler	B-Language
name	O
and	O
version	O
,	O
and	O
other	O
identifying	O
information	O
.	O
</s>
<s>
The	O
term	O
"	O
object	B-Application
program	I-Application
"	O
dates	O
from	O
at	O
least	O
the	O
1950s	O
:	O
</s>
<s>
A	O
computer	B-Application
programmer	I-Application
generates	O
object	B-Language
code	I-Language
with	O
a	O
compiler	B-Language
or	O
assembler	B-Application
.	O
</s>
<s>
For	O
example	O
,	O
under	O
Linux	B-Application
,	O
the	O
GNU	B-Application
Compiler	I-Application
Collection	I-Application
compiler	B-Language
will	O
generate	O
files	O
with	O
a	O
.o	B-Application
extension	O
which	O
use	O
the	O
ELF	O
format	O
.	O
</s>
<s>
Compilation	B-Language
on	O
Windows	O
generates	O
files	O
with	O
a	O
.obj	O
extension	O
which	O
use	O
the	O
COFF	O
format	O
.	O
</s>
<s>
A	O
linker	B-Application
is	O
then	O
used	O
to	O
combine	O
the	O
object	B-Language
code	I-Language
into	O
one	O
executable	B-Application
program	I-Application
or	O
library	B-Library
pulling	O
in	O
precompiled	O
system	B-Library
libraries	I-Library
as	O
needed	O
.	O
</s>
<s>
There	O
are	O
many	O
different	O
object	B-Application
file	I-Application
formats	I-Application
;	O
originally	O
each	O
type	O
of	O
computer	O
had	O
its	O
own	O
unique	O
format	O
,	O
but	O
with	O
the	O
advent	O
of	O
Unix	B-Application
and	O
other	O
portable	O
operating	B-General_Concept
systems	I-General_Concept
,	O
some	O
formats	O
,	O
such	O
as	O
ELF	O
and	O
COFF	O
,	O
have	O
been	O
defined	O
and	O
used	O
on	O
different	O
kinds	O
of	O
systems	O
.	O
</s>
<s>
It	O
is	O
possible	O
for	O
the	O
same	O
format	O
to	O
be	O
used	O
both	O
as	O
linker	B-Application
input	O
and	O
output	O
,	O
and	O
thus	O
as	O
the	O
library	B-Library
and	O
executable	B-Application
file	I-Application
format	I-Application
.	O
</s>
<s>
Some	O
formats	O
can	O
contain	O
machine	B-Language
code	I-Language
for	O
different	O
processors	O
,	O
with	O
the	O
correct	O
one	O
chosen	O
by	O
the	O
operating	B-General_Concept
system	I-General_Concept
when	O
the	O
program	O
is	O
loaded	O
.	O
</s>
<s>
Some	O
systems	O
make	O
a	O
distinction	O
between	O
formats	O
which	O
are	O
directly	O
executable	B-Application
and	O
formats	O
which	O
require	O
processing	O
by	O
the	O
linker	B-Application
.	O
</s>
<s>
For	O
example	O
,	O
OS/360	B-Application
and	I-Application
successors	I-Application
call	O
the	O
first	O
format	O
a	O
load	O
module	O
and	O
the	O
second	O
an	O
object	B-Application
module	I-Application
.	O
</s>
<s>
The	O
design	O
and/or	O
choice	O
of	O
an	O
object	B-Application
file	I-Application
format	I-Application
is	O
a	O
key	O
part	O
of	O
overall	O
system	O
design	O
.	O
</s>
<s>
It	O
affects	O
the	O
performance	O
of	O
the	O
linker	B-Application
and	O
thus	O
programmer	B-Application
turnaround	O
while	O
a	O
program	O
is	O
being	O
developed	O
.	O
</s>
<s>
If	O
the	O
format	O
is	O
used	O
for	O
executables	B-Application
,	O
the	O
design	O
also	O
affects	O
the	O
time	O
programs	O
take	O
to	O
begin	O
running	O
,	O
and	O
thus	O
the	O
responsiveness	B-Application
for	O
users	O
.	O
</s>
<s>
Many	O
early	O
computers	O
,	O
or	O
small	O
microcomputers	B-Architecture
,	O
support	O
only	O
an	O
absolute	O
object	B-Application
format	I-Application
.	O
</s>
<s>
Programs	O
are	O
not	O
relocatable	B-Library
;	O
they	O
need	O
to	O
be	O
assembled	O
or	O
compiled	B-Language
to	O
execute	O
at	O
specific	O
,	O
predefined	O
addresses	O
.	O
</s>
<s>
The	O
file	O
contains	O
no	O
relocation	B-Library
or	O
linkage	O
information	O
.	O
</s>
<s>
These	O
files	O
can	O
be	O
loaded	O
into	O
read/write	O
memory	O
,	O
or	O
stored	O
in	O
read-only	B-Device
memory	I-Device
.	O
</s>
<s>
For	O
example	O
,	O
the	O
Motorola	B-Device
6800	I-Device
MIKBUG	B-Device
monitor	O
contains	O
a	O
routine	O
to	O
read	O
an	O
absolute	O
object	B-Application
file	I-Application
(	O
SREC	O
Format	O
)	O
from	O
paper	O
tape	O
.	O
</s>
<s>
DOS	B-Device
COM	O
files	O
are	O
a	O
more	O
recent	O
example	O
of	O
absolute	O
object	B-Application
files	I-Application
.	O
</s>
<s>
Most	O
object	B-Application
file	I-Application
formats	I-Application
are	O
structured	O
as	O
separate	O
sections	O
of	O
data	O
,	O
each	O
section	O
containing	O
a	O
certain	O
type	O
of	O
data	O
.	O
</s>
<s>
These	O
sections	O
are	O
known	O
as	O
"	O
segments	O
"	O
due	O
to	O
the	O
term	O
"	O
memory	B-General_Concept
segment	I-General_Concept
"	O
,	O
which	O
was	O
previously	O
a	O
common	O
form	O
of	O
memory	B-General_Concept
management	I-General_Concept
.	O
</s>
<s>
When	O
a	O
program	O
is	O
loaded	O
into	O
memory	O
by	O
a	O
loader	B-Operating_System
,	O
the	O
loader	B-Operating_System
allocates	O
various	O
regions	O
of	O
memory	O
to	O
the	O
program	O
.	O
</s>
<s>
Some	O
of	O
these	O
regions	O
correspond	O
to	O
sections	O
of	O
the	O
object	B-Application
file	I-Application
,	O
and	O
thus	O
are	O
usually	O
known	O
by	O
the	O
same	O
names	O
.	O
</s>
<s>
In	O
some	O
cases	O
,	O
relocation	B-Library
is	O
done	O
by	O
the	O
loader	B-Operating_System
(	O
or	O
linker	B-Application
)	O
to	O
specify	O
the	O
actual	O
memory	O
addresses	O
.	O
</s>
<s>
However	O
,	O
for	O
many	O
programs	O
or	O
architectures	O
,	O
relocation	B-Library
is	O
not	O
necessary	O
,	O
due	O
to	O
being	O
handled	O
by	O
the	O
memory	B-General_Concept
management	I-General_Concept
unit	I-General_Concept
or	O
by	O
position-independent	B-Operating_System
code	I-Operating_System
.	O
</s>
<s>
On	O
some	O
systems	O
the	O
segments	O
of	O
the	O
object	B-Application
file	I-Application
can	O
then	O
be	O
copied	O
(	O
paged	O
)	O
into	O
memory	O
and	O
executed	O
,	O
without	O
needing	O
further	O
processing	O
.	O
</s>
<s>
On	O
these	O
systems	O
,	O
this	O
may	O
be	O
done	O
lazily	O
,	O
that	O
is	O
,	O
only	O
when	O
the	O
segments	O
are	O
referenced	O
during	O
execution	O
,	O
for	O
example	O
via	O
a	O
memory-mapped	B-General_Concept
file	I-General_Concept
backed	O
by	O
the	O
object	B-Application
file	I-Application
.	O
</s>
<s>
Types	O
of	O
data	O
supported	O
by	O
typical	O
object	B-Application
file	I-Application
formats	I-Application
:	O
</s>
<s>
Segments	O
in	O
different	O
object	B-Application
files	I-Application
may	O
be	O
combined	O
by	O
the	O
linker	B-Application
according	O
to	O
rules	O
specified	O
when	O
the	O
segments	O
are	O
defined	O
.	O
</s>
<s>
Conventions	O
exist	O
for	O
segments	O
shared	O
between	O
object	B-Application
files	I-Application
;	O
for	O
instance	O
,	O
in	O
DOS	B-Device
there	O
are	O
different	B-Device
memory	I-Device
models	I-Device
that	O
specify	O
the	O
names	O
of	O
special	O
segments	O
and	O
whether	O
or	O
not	O
they	O
may	O
be	O
combined	O
.	O
</s>
<s>
The	O
debugging	B-General_Concept
data	I-General_Concept
format	I-General_Concept
of	O
debugging	O
information	O
may	O
either	O
be	O
an	O
integral	O
part	O
of	O
the	O
object	B-Application
file	I-Application
format	I-Application
,	O
as	O
in	O
COFF	O
,	O
or	O
a	O
semi-independent	O
format	O
which	O
may	O
be	O
used	O
with	O
several	O
object	B-Application
formats	I-Application
,	O
such	O
as	O
stabs	B-General_Concept
or	O
DWARF	O
.	O
</s>
<s>
The	B-Application
GNU	I-Application
Project	I-Application
's	O
Binary	B-Application
File	I-Application
Descriptor	I-Application
library	I-Application
(	O
BFD	O
library	B-Library
)	O
provides	O
a	O
common	O
API	B-General_Concept
for	O
the	O
manipulation	O
of	O
object	B-Application
files	I-Application
in	O
a	O
variety	O
of	O
formats	O
.	O
</s>
