/* BFD back-end for VERSAdos-E objects.
- Copyright 1995, 96, 97, 98, 1999 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
Versados is a Motorola trademark.
o Object Text Recrod
o End Record
-
*/
#include "bfd.h"
#include "libbfd.h"
#include "libiberty.h"
-
static boolean versados_mkobject PARAMS ((bfd *));
static boolean versados_scan PARAMS ((bfd *));
static const bfd_target *versados_object_p PARAMS ((bfd *));
-
#define VHEADER '1'
#define VESTDEF '2'
#define VOTR '3'
#define VEND '4'
-
#define ES_BASE 17 /* first symbol has esdid 17 */
/* Per file target dependent information */
struct ext_otr otr;
};
-/* Initialize by filling in the hex conversion array. */
-
-
-
-
+/* Initialize by filling in the hex conversion array. */
/* Set up the tdata information. */
return true;
}
-
/* Report a problem in an S record file. FIXME: This probably should
not call fprintf, but we really do need some mechanism for printing
error messages. */
-
-
static asymbol *
versados_new_symbol (abfd, snum, name, val, sec)
bfd *abfd;
return n;
}
-
static int
get_record (abfd, ptr)
bfd *abfd;
return n;
}
-
static void
process_esd (abfd, esd, pass)
bfd *abfd;
}
break;
-
case ESD_ABS:
size = get_4 (&ptr);
start = get_4 (&ptr);
"-v32", true, 0xffffffff, 0xffffffff, false),
};
-
static int
get_offset (len, ptr)
int len;
int offsetlen = flag & 0x7;
int j;
-
if (esdids == 0)
{
/* A zero esdid means the new pc is the offset given */
int rn = EDATA (abfd, otr->esdid - 1).relocs++;
if (pass == 1)
{
- /* this is the first pass over the data,
+ /* this is the first pass over the data,
just remember that we need a reloc */
}
else
if (!contents && need_contents)
esdid->contents = (unsigned char *) bfd_alloc (abfd, esdid->section->_raw_size);
-
}
static boolean
int j;
int nsecs = 0;
+ VDATA (abfd)->stringlen = 0;
VDATA (abfd)->nrefs = 0;
VDATA (abfd)->ndefs = 0;
VDATA (abfd)->ref_idx = 0;
VDATA (abfd)->def_idx = 0;
+ VDATA (abfd)->pass_2_done = 0;
while (loop)
{
return 1;
}
-
-
/* Check whether an existing file is a versados file. */
static const bfd_target *
return abfd->xvec;
}
-
static boolean
versados_pass_2 (abfd)
bfd *abfd;
VDATA (abfd)->es_done = ES_BASE;
-
/* read records till we get to where we want to be */
while (1)
return false;
}
-
-/*ARGSUSED */
static int
versados_sizeof_headers (abfd, exec)
bfd *abfd ATTRIBUTE_UNUSED;
return symcount;
}
-/*ARGSUSED */
void
versados_get_symbol_info (ignore_abfd, symbol, ret)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
bfd_symbol_info (symbol, ret);
}
-/*ARGSUSED */
void
versados_print_symbol (ignore_abfd, afile, symbol, how)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
return (asect->reloc_count + 1) * sizeof (arelent *);
}
-
long
versados_canonicalize_reloc (abfd, section, relptr, symbols)
bfd *abfd;
bfd_generic_get_relocated_section_contents
#define versados_bfd_relax_section bfd_generic_relax_section
#define versados_bfd_gc_sections bfd_generic_gc_sections
+#define versados_bfd_merge_sections bfd_generic_merge_sections
#define versados_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
#define versados_bfd_link_add_symbols _bfd_generic_link_add_symbols
#define versados_bfd_final_link _bfd_generic_final_link
BFD_JUMP_TABLE_LINK (versados),
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
+ NULL,
+
(PTR) 0
};