aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorJ.T. Conklin <jtc@acorntoolworks.com>1995-07-24 21:02:03 +0000
committerJ.T. Conklin <jtc@acorntoolworks.com>1995-07-24 21:02:03 +0000
commit0ab7604296db34fb928ffe0509f9fa33cf7e956a (patch)
treefbb9a8eb94c4b32ec28f82b19a02590dabf61384 /binutils
parent86c2d1a39eae1a3145436c7fbbcfefdd253e2c4d (diff)
downloadgdb-0ab7604296db34fb928ffe0509f9fa33cf7e956a.zip
gdb-0ab7604296db34fb928ffe0509f9fa33cf7e956a.tar.gz
gdb-0ab7604296db34fb928ffe0509f9fa33cf7e956a.tar.bz2
* srconv.c (wr_hd): Set afl field to 4 for bfd_arch_sh.
* sysdump.c (fillup): Return size - 1, the last byte is a checksum and shouldn't be counted. * sysroff.info (hd): Changed segment identifier from a byte to a 1 bit field. The sysroff 2.0-01 specification seems to be in error here. Reduce width of following "spare" field from 4 to 3 bits. (rl): Changed order and width of first 4 bitfields to correspond to sysroff specification. (dln_head, dln_inside, dln_tail): Removed.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLogbin10565 -> 106418 bytes
-rw-r--r--binutils/srconv.c72
2 files changed, 55 insertions, 17 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index f0e7ae0..2799acaa 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
Binary files differ
diff --git a/binutils/srconv.c b/binutils/srconv.c
index 365d018..904083a 100644
--- a/binutils/srconv.c
+++ b/binutils/srconv.c
@@ -241,11 +241,9 @@ writeBARRAY (data, ptr, idx, size, file)
{
writeINT (data.data[i], ptr, idx, 1, file);
}
+}
-
-
-}
static void
writeCHARS (string, ptr, idx, size, file)
char *string;
@@ -271,7 +269,7 @@ writeCHARS (string, ptr, idx, size, file)
ptr[i++] = size;
}
-
+ /* BUG WAITING TO HAPPEN */
memcpy (ptr + i, string, size);
i += size;
*idx = i * 8;
@@ -294,8 +292,14 @@ static char *rname_h8300[] =
static void
wr_tr ()
{
- struct IT_tr t;
- sysroff_swap_tr_out (file, &t);
+ /* The TR block is not normal - it doesn't have any contents. */
+
+ static char b[] = {
+ 0xff, /* IT */
+ 0x03, /* RL */
+ 0xfd, /* CS */
+ };
+ fwrite (b, 1, sizeof (b), file);
}
static void
@@ -392,7 +396,7 @@ wr_hd (p)
case bfd_arch_sh:
hd.au = 8;
hd.si = 32;
- hd.afl = 2;
+ hd.afl = 4;
hd.spcsz = 0;
hd.segsz = 0;
hd.segsh = 0;
@@ -997,8 +1001,8 @@ walk_tree_symbol (sfile, section, symbol, nest)
{
dsy.type = STYPE_ENUM;
dsy.assign = 0;
- dsy.vallen = 4;
- dsy.value = symbol->where->offset;
+ dsy.evallen = 4;
+ dsy.evalue = symbol->where->offset;
}
if (symbol->type->type == coff_structdef_type
@@ -1551,15 +1555,47 @@ wr_debug (p)
n++;
}
}
+
static void
wr_cs ()
{
/* It seems that the CS struct is not normal - the size is wrong
heres one I prepared earlier.. */
- static char b[] =
- {0x80, 0x21, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x80, 0x80,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x80, 0x00,
- 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0xde};
+ static char b[] = {
+ 0x80, /* IT */
+ 0x21, /* RL */
+ 0x00, /* number of chars in variable length part */
+ 0x80, /* hd */
+ 0x00, /* hs */
+ 0x80, /* un */
+ 0x00, /* us */
+ 0x80, /* sc */
+ 0x00, /* ss */
+ 0x80, /* er */
+ 0x80, /* ed */
+ 0x80, /* sh */
+ 0x80, /* ob */
+ 0x80, /* rl */
+ 0x80, /* du */
+ 0x80, /* dps */
+ 0x80, /* dsy */
+ 0x80, /* dty */
+ 0x80, /* dln */
+ 0x80, /* dso */
+ 0x80, /* dus */
+ 0x00, /* dss */
+ 0x80, /* dbt */
+ 0x00, /* dpp */
+ 0x80, /* dfp */
+ 0x80, /* den */
+ 0x80, /* dds */
+ 0x80, /* dar */
+ 0x80, /* dpt */
+ 0x00, /* dul */
+ 0x00, /* dse */
+ 0x00, /* dot */
+ 0xDE /* CS */
+ };
fwrite (b, 1, sizeof (b), file);
}
@@ -1686,6 +1722,8 @@ int scount = 0;
return scount;
}
+
+/* Write out the ER records for a unit. */
static void
wr_er (ptr, sfile, first)
struct coff_ofile *ptr;
@@ -1706,12 +1744,12 @@ wr_er (ptr, sfile, first)
er.name = sym->name;
sysroff_swap_er_out (file, &er);
sym->er_number = idx++;
-
}
}
}
}
+/* Write out the ED records for a unit. */
static void
wr_ed (ptr, sfile, first)
struct coff_ofile *ptr;
@@ -1768,9 +1806,9 @@ wr_unit_info (ptr)
wr_un (ptr, sfile, first, 0);
nsecs = wr_sc (ptr, sfile);
p2 = ftell (file);
- fseek (file, p1, 0);
+ fseek (file, p1, SEEK_SET);
wr_un (ptr, sfile, first, nsecs);
- fseek (file, p2, 0);
+ fseek (file, p2, SEEK_SET);
wr_er (ptr, sfile, first);
wr_ed (ptr, sfile, first);
first = 0;
@@ -1966,7 +2004,7 @@ main (ac, av)
exit (1);
}
- file = fopen (output_file, "wb");
+ file = fopen (output_file, FOPEN_WB);
if (!file)
{