Changed some names
This commit is contained in:
parent
8811a2af14
commit
df69d70608
|
@ -1,8 +1,9 @@
|
|||
#include <system.h>
|
||||
#include <back.h>
|
||||
|
||||
extern File *_out_file;
|
||||
extern File *B_out_file;
|
||||
|
||||
close_back()
|
||||
{
|
||||
sys_close( _out_file);
|
||||
sys_close( B_out_file);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include <system.h>
|
||||
#include <back.h>
|
||||
|
||||
File *_out_file;
|
||||
File *B_out_file;
|
||||
|
||||
open_back( filename)
|
||||
char *filename;
|
||||
|
@ -8,6 +9,6 @@ char *filename;
|
|||
if ( filename == (char *) '\0')
|
||||
return( 0);
|
||||
else
|
||||
return( sys_open( filename, OP_WRITE, &_out_file));
|
||||
return( sys_open( filename, OP_WRITE, &B_out_file));
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
Read above comment ...
|
||||
#endif
|
||||
|
||||
extern File *_out_file;
|
||||
extern File *B_out_file;
|
||||
|
||||
#include <a.out.h>
|
||||
#include <alloc.h>
|
||||
|
@ -19,7 +19,7 @@ static struct exec u_header;
|
|||
|
||||
static long ntext, ndata, nrelo, nchar;
|
||||
|
||||
long _base_address[SEGBSS+1];
|
||||
long B_base_address[SEGBSS+1];
|
||||
|
||||
static int trsize=0, drsize=0;
|
||||
|
||||
|
@ -272,7 +272,7 @@ register struct nlist *u_name;
|
|||
u_name->n_value = a_name->on_valu;
|
||||
else if ( a_name->on_valu != -1)
|
||||
u_name->n_value = a_name->on_valu +
|
||||
_base_address[( a_name->on_type & S_TYP) - S_MIN];
|
||||
B_base_address[( a_name->on_type & S_TYP) - S_MIN];
|
||||
else
|
||||
u_name->n_value = 0;
|
||||
}
|
||||
|
@ -289,5 +289,5 @@ putbuf(buf,n)
|
|||
char *buf;
|
||||
long n;
|
||||
{
|
||||
sys_write( _out_file, buf, n);
|
||||
sys_write( B_out_file, buf, n);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
/* Written to run on SUN, and generate code for SUN */
|
||||
|
||||
extern long _base_address[];
|
||||
extern long B_base_address[];
|
||||
|
||||
do_local_relocation()
|
||||
{
|
||||
|
@ -12,9 +12,9 @@ do_local_relocation()
|
|||
|
||||
/* print( "n relocation records %d\n", relo - reloc_info); */
|
||||
|
||||
_base_address[SEGTXT] = 0;
|
||||
_base_address[SEGCON] = text - text_area;
|
||||
_base_address[SEGBSS] = _base_address[SEGCON] + data - data_area;
|
||||
B_base_address[SEGTXT] = 0;
|
||||
B_base_address[SEGCON] = text - text_area;
|
||||
B_base_address[SEGBSS] = B_base_address[SEGCON] + data - data_area;
|
||||
for ( rp = reloc_info; rp < relo; rp++) {
|
||||
register struct outname *np = &symbol_table[rp->or_nami];
|
||||
|
||||
|
@ -37,7 +37,7 @@ do_local_relocation()
|
|||
if ( rp->or_type & RELO4)
|
||||
*((long *)(sect+rp->or_addr)) +=
|
||||
np->on_valu +
|
||||
_base_address[(np->on_type&S_TYP)-S_MIN];
|
||||
B_base_address[(np->on_type&S_TYP)-S_MIN];
|
||||
else
|
||||
fprint( STDERR,
|
||||
"do_relo() : bad relocation size\n");
|
||||
|
|
Loading…
Reference in a new issue