[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

akcl 609



A new version has been released and is on the standard
machines:

rascal.ics.utexas.edu
cli.com
utsun.s.u-tokyo.ac.jp

It contains some fixes over akcl 605.  A few of the more
important changes are:

1) It can work with gcc version 2 on sparcs and mac2's and
   probably other architectures.
2) works around a dec3100 C compiler bug which caused
  'unaligned access' on running compiled code of read-char
3) fixes a rare gc bug in loading .o files for machines with alloca.
4) support for AUX (on mac 2) mainly by weigert.
5) change for hp800 version so data starts at 4zillion, otherwise
   only one image at a time runs.
6) a little more save and restore around terminal interrupts.

It is probable that when compiling with gcc2 on some machines there
will be relocation types generated which are not handled by the rel_*.c
code.     I insert a version below for the mac2 which was not in
release 609, but which showed up when people used gcc2 on that version.
It may well be that gcc2 on the dec3100 will cure some problems with
that compiler.   I don't know.

Bill Schelter




Inserting file /public/akcl/c/rel_mac2.c
---Begin File /public/akcl/c/rel_mac2.c---

/* Copyright William Schelter. All rights reserved.  This file does
the low level relocation which tends to be very system dependent.
It is included by the file sfasl.c
*/


relocate()
{
  char *where;
  describe_sym(relocation_info.r_symndx);
  where = the_start + relocation_info.r_vaddr;
  dprintf (where has %x , *where);
  dprintf(   at %x -->, where );
  
  if (relocation_info.r_type == R_ABS)
    { dprintf( r_abs ,0)  return; }
  switch(relocation_info.r_type)
    { int *q;

    case      R_RELLONG:
      dprintf(new val r_rellong %x ,  *((int *)where) + 
	      symbol_table[relocation_info.r_symndx].n_value);
      *(int *)where= *((int *)where) +
                 symbol_table[relocation_info.r_symndx].n_value;
      break;

    case    R_RELWORD:
        dprintf(new val r_relword %x ,  *((short *)where) + 
	      symbol_table[relocation_info.r_symndx].n_value);
      *(short *)where= *((short *)where) +
                 symbol_table[relocation_info.r_symndx].n_value;
      break;
    case R_PCRLONG:

      dprintf( r_pcrlong new value = %x ,
	      *((int *)where)  - (int)start_address
	      + symbol_table[relocation_info.r_symndx].n_value );
      *(int *)where=  *((int *)where)  - (int)start_address
	+ symbol_table[relocation_info.r_symndx].n_value;
      break;

    default:
      fprintf(stdout, "%d: unsupported relocation type.",
	      relocation_info.r_type);
      FEerror("The relocation type was unknown",0,0);
    }

}

---End File /public/akcl/c/rel_mac2.c---