00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #define UNDERSCORE_HACK 1
00027 #include "bfd.h"
00028 #include "sysdep.h"
00029 #include "safe-ctype.h"
00030 #include "libbfd.h"
00031 #include "oasys.h"
00032 #include "liboasys.h"
00033
00034 static bfd_boolean oasys_slurp_section_data
00035 PARAMS ((bfd * const));
00036 static bfd_boolean oasys_read_record
00037 PARAMS ((bfd *, oasys_record_union_type *));
00038 static bfd_boolean oasys_write_sections
00039 PARAMS ((bfd *));
00040 static bfd_boolean oasys_write_record
00041 PARAMS ((bfd *, oasys_record_enum_type, oasys_record_union_type *, size_t));
00042 static bfd_boolean oasys_write_syms
00043 PARAMS ((bfd *));
00044 static bfd_boolean oasys_write_header
00045 PARAMS ((bfd *));
00046 static bfd_boolean oasys_write_end
00047 PARAMS ((bfd *));
00048 static bfd_boolean oasys_write_data
00049 PARAMS ((bfd *));
00050 static size_t oasys_string_length
00051 PARAMS ((oasys_record_union_type *));
00052 static bfd_boolean oasys_slurp_symbol_table
00053 PARAMS ((bfd *const));
00054 static long int oasys_get_symtab_upper_bound
00055 PARAMS ((bfd *const));
00056 static const bfd_target *oasys_archive_p
00057 PARAMS ((bfd *));
00058 static bfd_boolean oasys_mkobject
00059 PARAMS ((bfd *));
00060 static const bfd_target *oasys_object_p
00061 PARAMS ((bfd *));
00062 static void oasys_get_symbol_info
00063 PARAMS ((bfd *, asymbol *, symbol_info *));
00064 static void oasys_print_symbol
00065 PARAMS ((bfd *, void *, asymbol *, bfd_print_symbol_type));
00066 static bfd_boolean oasys_new_section_hook
00067 PARAMS ((bfd *, asection *));
00068 static long int oasys_get_reloc_upper_bound
00069 PARAMS ((bfd *, sec_ptr));
00070 static bfd_boolean oasys_get_section_contents
00071 PARAMS ((bfd *, sec_ptr, void *, file_ptr, bfd_size_type));
00072 static int comp
00073 PARAMS ((const void *, const void *));
00074 static bfd_boolean oasys_write_object_contents
00075 PARAMS ((bfd *));
00076 static bfd_boolean oasys_set_section_contents
00077 PARAMS ((bfd *, sec_ptr, const void *, file_ptr, bfd_size_type));
00078 static asymbol *oasys_make_empty_symbol
00079 PARAMS ((bfd *));
00080 static bfd *oasys_openr_next_archived_file
00081 PARAMS ((bfd *, bfd *));
00082 static bfd_boolean oasys_find_nearest_line
00083 PARAMS ((bfd *, asection *, asymbol **, bfd_vma,
00084 const char **, const char **, unsigned int *));
00085 static int oasys_generic_stat_arch_elt
00086 PARAMS ((bfd *, struct stat *));
00087 static int oasys_sizeof_headers
00088 PARAMS ((bfd *, bfd_boolean));
00089
00090 long oasys_canonicalize_symtab
00091 PARAMS ((bfd *, asymbol **));
00092 long oasys_canonicalize_reloc
00093 PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
00094
00095
00096
00097 static bfd_boolean
00098 oasys_read_record (abfd, record)
00099 bfd *abfd;
00100 oasys_record_union_type *record;
00101 {
00102 bfd_size_type amt = sizeof (record->header);
00103 if (bfd_bread ((PTR) record, amt, abfd) != amt)
00104 return FALSE;
00105
00106 amt = record->header.length - sizeof (record->header);
00107 if ((long) amt <= 0)
00108 return TRUE;
00109 if (bfd_bread ((PTR) ((char *) record + sizeof (record->header)), amt, abfd)
00110 != amt)
00111 return FALSE;
00112 return TRUE;
00113 }
00114
00115 static size_t
00116 oasys_string_length (record)
00117 oasys_record_union_type *record;
00118 {
00119 return record->header.length
00120 - ((char *) record->symbol.name - (char *) record);
00121 }
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139 static bfd_boolean
00140 oasys_slurp_symbol_table (abfd)
00141 bfd *const abfd;
00142 {
00143 oasys_record_union_type record;
00144 oasys_data_type *data = OASYS_DATA (abfd);
00145 bfd_boolean loop = TRUE;
00146 asymbol *dest_defined;
00147 asymbol *dest;
00148 char *string_ptr;
00149 bfd_size_type amt;
00150
00151 if (data->symbols != (asymbol *) NULL)
00152 {
00153 return TRUE;
00154 }
00155
00156 amt = abfd->symcount;
00157 amt *= sizeof (asymbol);
00158 data->symbols = (asymbol *) bfd_alloc (abfd, amt);
00159
00160 amt = data->symbol_string_length;
00161 #ifdef UNDERSCORE_HACK
00162
00163 amt += abfd->symcount;
00164 #endif
00165 data->strings = bfd_alloc (abfd, amt);
00166
00167 if (!data->symbols || !data->strings)
00168 return FALSE;
00169
00170 dest_defined = data->symbols + abfd->symcount - 1;
00171
00172 string_ptr = data->strings;
00173 if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
00174 return FALSE;
00175 while (loop)
00176 {
00177
00178 if (! oasys_read_record (abfd, &record))
00179 return FALSE;
00180 switch (record.header.type)
00181 {
00182 case oasys_record_is_header_enum:
00183 break;
00184 case oasys_record_is_local_enum:
00185 case oasys_record_is_symbol_enum:
00186 {
00187 int flag = record.header.type == (int) oasys_record_is_local_enum ?
00188 (BSF_LOCAL) : (BSF_GLOBAL | BSF_EXPORT);
00189
00190
00191 size_t length = oasys_string_length (&record);
00192 switch (record.symbol.relb & RELOCATION_TYPE_BITS)
00193 {
00194 case RELOCATION_TYPE_ABS:
00195 dest = dest_defined--;
00196 dest->section = bfd_abs_section_ptr;
00197 dest->flags = 0;
00198
00199 break;
00200 case RELOCATION_TYPE_REL:
00201 dest = dest_defined--;
00202 dest->section =
00203 OASYS_DATA (abfd)->sections[record.symbol.relb &
00204 RELOCATION_SECT_BITS];
00205 if (record.header.type == (int) oasys_record_is_local_enum)
00206 {
00207 dest->flags = BSF_LOCAL;
00208 if (dest->section == (asection *) (~0))
00209 {
00210
00211
00212
00213 dest->section = 0;
00214 }
00215 }
00216 else
00217 {
00218
00219 dest->flags = flag;
00220 }
00221 break;
00222 case RELOCATION_TYPE_UND:
00223 dest = data->symbols + H_GET_16 (abfd, record.symbol.refno);
00224 dest->section = bfd_und_section_ptr;
00225 break;
00226 case RELOCATION_TYPE_COM:
00227 dest = dest_defined--;
00228 dest->name = string_ptr;
00229 dest->the_bfd = abfd;
00230
00231 dest->section = bfd_com_section_ptr;
00232
00233 break;
00234 default:
00235 dest = dest_defined--;
00236 BFD_ASSERT (0);
00237 break;
00238 }
00239 dest->name = string_ptr;
00240 dest->the_bfd = abfd;
00241 dest->udata.p = (PTR) NULL;
00242 dest->value = H_GET_32 (abfd, record.symbol.value);
00243
00244 #ifdef UNDERSCORE_HACK
00245 if (record.symbol.name[0] != '_')
00246 {
00247 string_ptr[0] = '_';
00248 string_ptr++;
00249 }
00250 #endif
00251 memcpy (string_ptr, record.symbol.name, length);
00252
00253
00254 string_ptr[length] = 0;
00255 string_ptr += length + 1;
00256 }
00257 break;
00258 default:
00259 loop = FALSE;
00260 }
00261 }
00262 return TRUE;
00263 }
00264
00265 static long
00266 oasys_get_symtab_upper_bound (abfd)
00267 bfd *const abfd;
00268 {
00269 if (! oasys_slurp_symbol_table (abfd))
00270 return -1;
00271
00272 return (abfd->symcount + 1) * (sizeof (oasys_symbol_type *));
00273 }
00274
00275 extern const bfd_target oasys_vec;
00276
00277 long
00278 oasys_canonicalize_symtab (abfd, location)
00279 bfd *abfd;
00280 asymbol **location;
00281 {
00282 asymbol *symbase;
00283 unsigned int counter;
00284 if (! oasys_slurp_symbol_table (abfd))
00285 {
00286 return -1;
00287 }
00288 symbase = OASYS_DATA (abfd)->symbols;
00289 for (counter = 0; counter < abfd->symcount; counter++)
00290 {
00291 *(location++) = symbase++;
00292 }
00293 *location = 0;
00294 return abfd->symcount;
00295 }
00296
00297
00298
00299
00300
00301 static const bfd_target *
00302 oasys_archive_p (abfd)
00303 bfd *abfd;
00304 {
00305 oasys_archive_header_type header;
00306 oasys_extarchive_header_type header_ext;
00307 unsigned int i;
00308 file_ptr filepos;
00309 bfd_size_type amt;
00310
00311 amt = sizeof (header_ext);
00312 if (bfd_seek (abfd, (file_ptr) 0, 0) != 0
00313 || bfd_bread ((PTR) &header_ext, amt, abfd) != amt)
00314 {
00315 if (bfd_get_error () != bfd_error_system_call)
00316 bfd_set_error (bfd_error_wrong_format);
00317 return NULL;
00318 }
00319
00320 header.version = H_GET_32 (abfd, header_ext.version);
00321 header.mod_count = H_GET_32 (abfd, header_ext.mod_count);
00322 header.mod_tbl_offset = H_GET_32 (abfd, header_ext.mod_tbl_offset);
00323 header.sym_tbl_size = H_GET_32 (abfd, header_ext.sym_tbl_size);
00324 header.sym_count = H_GET_32 (abfd, header_ext.sym_count);
00325 header.sym_tbl_offset = H_GET_32 (abfd, header_ext.sym_tbl_offset);
00326 header.xref_count = H_GET_32 (abfd, header_ext.xref_count);
00327 header.xref_lst_offset = H_GET_32 (abfd, header_ext.xref_lst_offset);
00328
00329
00330
00331
00332
00333
00334
00335 if (header.version > 10000 ||
00336 header.mod_count > 10000 ||
00337 header.sym_count > 100000 ||
00338 header.xref_count > 100000)
00339 return (const bfd_target *) NULL;
00340
00341
00342
00343
00344
00345 {
00346 oasys_ar_data_type *ar;
00347 oasys_module_info_type *module;
00348 oasys_module_table_type record;
00349
00350 amt = sizeof (oasys_ar_data_type);
00351 ar = (oasys_ar_data_type *) bfd_alloc (abfd, amt);
00352
00353 amt = header.mod_count;
00354 amt *= sizeof (oasys_module_info_type);
00355 module = (oasys_module_info_type *) bfd_alloc (abfd, amt);
00356
00357 if (!ar || !module)
00358 return NULL;
00359
00360 abfd->tdata.oasys_ar_data = ar;
00361 ar->module = module;
00362 ar->module_count = header.mod_count;
00363
00364 filepos = header.mod_tbl_offset;
00365 for (i = 0; i < header.mod_count; i++)
00366 {
00367 if (bfd_seek (abfd, filepos, SEEK_SET) != 0)
00368 return NULL;
00369
00370
00371
00372 if (0)
00373 {
00374 oasys_extmodule_table_type_a_type record_ext;
00375
00376 amt = sizeof (record_ext);
00377 if (bfd_bread ((PTR) &record_ext, amt, abfd) != amt)
00378 return NULL;
00379
00380 record.mod_size = H_GET_32 (abfd, record_ext.mod_size);
00381 record.file_offset = H_GET_32 (abfd, record_ext.file_offset);
00382
00383 record.dep_count = H_GET_32 (abfd, record_ext.dep_count);
00384 record.depee_count = H_GET_32 (abfd, record_ext.depee_count);
00385 record.sect_count = H_GET_32 (abfd, record_ext.sect_count);
00386
00387 module[i].name = bfd_alloc (abfd, (bfd_size_type) 33);
00388 if (!module[i].name)
00389 return NULL;
00390
00391 memcpy (module[i].name, record_ext.mod_name, 33);
00392 filepos +=
00393 sizeof (record_ext) +
00394 record.dep_count * 4 +
00395 record.depee_count * 4 +
00396 record.sect_count * 8 + 187;
00397 }
00398 else
00399 {
00400 oasys_extmodule_table_type_b_type record_ext;
00401
00402 amt = sizeof (record_ext);
00403 if (bfd_bread ((PTR) &record_ext, amt, abfd) != amt)
00404 return NULL;
00405
00406 record.mod_size = H_GET_32 (abfd, record_ext.mod_size);
00407 record.file_offset = H_GET_32 (abfd, record_ext.file_offset);
00408
00409 record.dep_count = H_GET_32 (abfd, record_ext.dep_count);
00410 record.depee_count = H_GET_32 (abfd, record_ext.depee_count);
00411 record.sect_count = H_GET_32 (abfd, record_ext.sect_count);
00412 record.module_name_size = H_GET_32 (abfd,
00413 record_ext.mod_name_length);
00414
00415 amt = record.module_name_size;
00416 module[i].name = bfd_alloc (abfd, amt + 1);
00417 if (!module[i].name)
00418 return NULL;
00419 if (bfd_bread ((PTR) module[i].name, amt, abfd) != amt)
00420 return NULL;
00421 module[i].name[record.module_name_size] = 0;
00422 filepos += (sizeof (record_ext)
00423 + record.dep_count * 4
00424 + record.module_name_size + 1);
00425 }
00426
00427 module[i].size = record.mod_size;
00428 module[i].pos = record.file_offset;
00429 module[i].abfd = 0;
00430 }
00431 }
00432 return abfd->xvec;
00433 }
00434
00435 static bfd_boolean
00436 oasys_mkobject (abfd)
00437 bfd *abfd;
00438 {
00439 bfd_size_type amt = sizeof (oasys_data_type);
00440 abfd->tdata.oasys_obj_data = (oasys_data_type *) bfd_alloc (abfd, amt);
00441 return abfd->tdata.oasys_obj_data != NULL;
00442 }
00443
00444 #define MAX_SECS 16
00445 static const bfd_target *
00446 oasys_object_p (abfd)
00447 bfd *abfd;
00448 {
00449 oasys_data_type *oasys;
00450 oasys_data_type *save = OASYS_DATA (abfd);
00451 bfd_boolean loop = TRUE;
00452 bfd_boolean had_usefull = FALSE;
00453
00454 abfd->tdata.oasys_obj_data = 0;
00455 oasys_mkobject (abfd);
00456 oasys = OASYS_DATA (abfd);
00457 memset ((PTR) oasys->sections, 0xff, sizeof (oasys->sections));
00458
00459
00460 if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
00461 goto fail;
00462 oasys->symbol_string_length = 0;
00463
00464
00465
00466 oasys->first_data_record = 0;
00467 while (loop)
00468 {
00469 oasys_record_union_type record;
00470 if (! oasys_read_record (abfd, &record))
00471 goto fail;
00472 if ((size_t) record.header.length < (size_t) sizeof (record.header))
00473 goto fail;
00474
00475
00476 switch ((oasys_record_enum_type) (record.header.type))
00477 {
00478 case oasys_record_is_header_enum:
00479 had_usefull = TRUE;
00480 break;
00481 case oasys_record_is_symbol_enum:
00482 case oasys_record_is_local_enum:
00483
00484 abfd->symcount++;
00485 oasys->symbol_string_length += 1 + oasys_string_length (&record);
00486 had_usefull = TRUE;
00487 break;
00488 case oasys_record_is_section_enum:
00489 {
00490 asection *s;
00491 char *buffer;
00492 unsigned int section_number;
00493 if (record.section.header.length != sizeof (record.section))
00494 {
00495 goto fail;
00496 }
00497 buffer = bfd_alloc (abfd, (bfd_size_type) 3);
00498 if (!buffer)
00499 goto fail;
00500 section_number = record.section.relb & RELOCATION_SECT_BITS;
00501 sprintf (buffer, "%u", section_number);
00502 s = bfd_make_section (abfd, buffer);
00503 oasys->sections[section_number] = s;
00504 switch (record.section.relb & RELOCATION_TYPE_BITS)
00505 {
00506 case RELOCATION_TYPE_ABS:
00507 case RELOCATION_TYPE_REL:
00508 break;
00509 case RELOCATION_TYPE_UND:
00510 case RELOCATION_TYPE_COM:
00511 BFD_FAIL ();
00512 }
00513
00514 s->size = H_GET_32 (abfd, record.section.value);
00515 s->vma = H_GET_32 (abfd, record.section.vma);
00516 s->flags = 0;
00517 had_usefull = TRUE;
00518 }
00519 break;
00520 case oasys_record_is_data_enum:
00521 oasys->first_data_record = bfd_tell (abfd) - record.header.length;
00522 case oasys_record_is_debug_enum:
00523 case oasys_record_is_module_enum:
00524 case oasys_record_is_named_section_enum:
00525 case oasys_record_is_end_enum:
00526 if (! had_usefull)
00527 goto fail;
00528 loop = FALSE;
00529 break;
00530 default:
00531 goto fail;
00532 }
00533 }
00534 oasys->symbols = (asymbol *) NULL;
00535
00536
00537
00538
00539 bfd_default_set_arch_mach (abfd, bfd_arch_m68k, 0);
00540 if (abfd->symcount != 0)
00541 {
00542 abfd->flags |= HAS_SYMS;
00543 }
00544
00545
00546
00547
00548
00549 oasys_slurp_section_data (abfd);
00550
00551
00552 return abfd->xvec;
00553
00554 fail:
00555 (void) bfd_release (abfd, oasys);
00556 abfd->tdata.oasys_obj_data = save;
00557 return (const bfd_target *) NULL;
00558 }
00559
00560
00561 static void
00562 oasys_get_symbol_info (ignore_abfd, symbol, ret)
00563 bfd *ignore_abfd ATTRIBUTE_UNUSED;
00564 asymbol *symbol;
00565 symbol_info *ret;
00566 {
00567 bfd_symbol_info (symbol, ret);
00568 if (!symbol->section)
00569 ret->type = (symbol->flags & BSF_LOCAL) ? 'a' : 'A';
00570 }
00571
00572 static void
00573 oasys_print_symbol (abfd, afile, symbol, how)
00574 bfd *abfd;
00575 PTR afile;
00576 asymbol *symbol;
00577 bfd_print_symbol_type how;
00578 {
00579 FILE *file = (FILE *) afile;
00580
00581 switch (how)
00582 {
00583 case bfd_print_symbol_name:
00584 case bfd_print_symbol_more:
00585 fprintf (file, "%s", symbol->name);
00586 break;
00587 case bfd_print_symbol_all:
00588 {
00589 const char *section_name = symbol->section == (asection *) NULL ?
00590 (const char *) "*abs" : symbol->section->name;
00591
00592 bfd_print_symbol_vandf (abfd, (PTR) file, symbol);
00593
00594 fprintf (file, " %-5s %s",
00595 section_name,
00596 symbol->name);
00597 }
00598 break;
00599 }
00600 }
00601
00602
00603
00604
00605 static reloc_howto_type howto_table[] =
00606 {
00607
00608 HOWTO (0, 0, 1, 16, FALSE, 0, complain_overflow_bitfield, 0, "abs16", TRUE, 0x0000ffff, 0x0000ffff, FALSE),
00609 HOWTO (0, 0, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "abs32", TRUE, 0xffffffff, 0xffffffff, FALSE),
00610 HOWTO (0, 0, 1, 16, TRUE, 0, complain_overflow_signed, 0, "pcrel16", TRUE, 0x0000ffff, 0x0000ffff, FALSE),
00611 HOWTO (0, 0, 2, 32, TRUE, 0, complain_overflow_signed, 0, "pcrel32", TRUE, 0xffffffff, 0xffffffff, FALSE)
00612 };
00613
00614
00615 static bfd_boolean
00616 oasys_slurp_section_data (abfd)
00617 bfd *const abfd;
00618 {
00619 oasys_record_union_type record;
00620 oasys_data_type *data = OASYS_DATA (abfd);
00621 bfd_boolean loop = TRUE;
00622 oasys_per_section_type *per;
00623 asection *s;
00624 bfd_size_type amt;
00625
00626
00627 for (s = abfd->sections; s != (asection *) NULL; s = s->next)
00628 {
00629 per = oasys_per_section (s);
00630 if (per->initialized)
00631 return TRUE;
00632 }
00633
00634 if (data->first_data_record == 0)
00635 return TRUE;
00636
00637 if (bfd_seek (abfd, data->first_data_record, SEEK_SET) != 0)
00638 return FALSE;
00639 while (loop)
00640 {
00641 if (! oasys_read_record (abfd, &record))
00642 return FALSE;
00643 switch (record.header.type)
00644 {
00645 case oasys_record_is_header_enum:
00646 break;
00647 case oasys_record_is_data_enum:
00648 {
00649
00650 bfd_byte *src = record.data.data;
00651 bfd_byte *end_src = ((bfd_byte *) & record) + record.header.length;
00652 bfd_byte *dst_ptr;
00653 bfd_byte *dst_base_ptr;
00654 unsigned int relbit;
00655 unsigned int count;
00656 asection *section =
00657 data->sections[record.data.relb & RELOCATION_SECT_BITS];
00658 bfd_vma dst_offset;
00659
00660 per = oasys_per_section (section);
00661
00662 if (! per->initialized)
00663 {
00664 per->data = (bfd_byte *) bfd_zalloc (abfd, section->size);
00665 if (!per->data)
00666 return FALSE;
00667 per->reloc_tail_ptr
00668 = (oasys_reloc_type **) §ion->relocation;
00669 per->had_vma = FALSE;
00670 per->initialized = TRUE;
00671 section->reloc_count = 0;
00672 section->flags = SEC_ALLOC;
00673 }
00674
00675 dst_offset = H_GET_32 (abfd, record.data.addr);
00676 if (! per->had_vma)
00677 {
00678
00679 section->vma = dst_offset;
00680 per->had_vma = TRUE;
00681 }
00682
00683 dst_offset -= section->vma;
00684
00685 dst_base_ptr = oasys_per_section (section)->data;
00686 dst_ptr = oasys_per_section (section)->data +
00687 dst_offset;
00688
00689 if (src < end_src)
00690 {
00691 section->flags |= SEC_LOAD | SEC_HAS_CONTENTS;
00692 }
00693 while (src < end_src)
00694 {
00695 unsigned char mod_byte = *src++;
00696 size_t gap = end_src - src;
00697
00698 count = 8;
00699 if (mod_byte == 0 && gap >= 8)
00700 {
00701 dst_ptr[0] = src[0];
00702 dst_ptr[1] = src[1];
00703 dst_ptr[2] = src[2];
00704 dst_ptr[3] = src[3];
00705 dst_ptr[4] = src[4];
00706 dst_ptr[5] = src[5];
00707 dst_ptr[6] = src[6];
00708 dst_ptr[7] = src[7];
00709 dst_ptr += 8;
00710 src += 8;
00711 }
00712 else
00713 {
00714 for (relbit = 1; count-- != 0 && src < end_src; relbit <<= 1)
00715 {
00716 if (relbit & mod_byte)
00717 {
00718 unsigned char reloc = *src;
00719
00720 switch (reloc & RELOCATION_TYPE_BITS)
00721 {
00722 case RELOCATION_TYPE_ABS:
00723
00724 break;
00725
00726 case RELOCATION_TYPE_REL:
00727 {
00728
00729 oasys_reloc_type *r;
00730
00731 amt = sizeof (oasys_reloc_type);
00732 r = (oasys_reloc_type *) bfd_alloc (abfd,
00733 amt);
00734 if (!r)
00735 return FALSE;
00736 *(per->reloc_tail_ptr) = r;
00737 per->reloc_tail_ptr = &r->next;
00738 r->next = (oasys_reloc_type *) NULL;
00739
00740 src++;
00741
00742 r->symbol = 0;
00743
00744 abort ();
00745 r->relent.address = dst_ptr - dst_base_ptr;
00746 r->relent.howto = &howto_table[reloc >> 6];
00747 r->relent.sym_ptr_ptr = (asymbol **) NULL;
00748 section->reloc_count++;
00749
00750
00751
00752
00753
00754
00755 if (r->relent.howto->pc_relative)
00756 r->relent.addend -= dst_ptr - dst_base_ptr;
00757 }
00758 break;
00759
00760
00761 case RELOCATION_TYPE_UND:
00762 {
00763 oasys_reloc_type *r;
00764
00765 amt = sizeof (oasys_reloc_type);
00766 r = (oasys_reloc_type *) bfd_alloc (abfd,
00767 amt);
00768 if (!r)
00769 return FALSE;
00770 *(per->reloc_tail_ptr) = r;
00771 per->reloc_tail_ptr = &r->next;
00772 r->next = (oasys_reloc_type *) NULL;
00773
00774 src++;
00775
00776 r->symbol = (src[0] << 8) | src[1];
00777
00778 abort ();
00779
00780 r->relent.addend = 0;
00781 r->relent.address = dst_ptr - dst_base_ptr;
00782 r->relent.howto = &howto_table[reloc >> 6];
00783 r->relent.sym_ptr_ptr = (asymbol **) NULL;
00784 section->reloc_count++;
00785
00786 src += 2;
00787
00788
00789
00790
00791
00792 if (r->relent.howto->pc_relative)
00793 r->relent.addend -= dst_ptr - dst_base_ptr;
00794 }
00795 break;
00796 case RELOCATION_TYPE_COM:
00797 BFD_FAIL ();
00798 }
00799 }
00800 *dst_ptr++ = *src++;
00801 }
00802 }
00803 }
00804 }
00805 break;
00806 case oasys_record_is_local_enum:
00807 case oasys_record_is_symbol_enum:
00808 case oasys_record_is_section_enum:
00809 break;
00810 default:
00811 loop = FALSE;
00812 }
00813 }
00814
00815 return TRUE;
00816
00817 }
00818
00819 static bfd_boolean
00820 oasys_new_section_hook (abfd, newsect)
00821 bfd *abfd;
00822 asection *newsect;
00823 {
00824 newsect->used_by_bfd = (PTR)
00825 bfd_alloc (abfd, (bfd_size_type) sizeof (oasys_per_section_type));
00826 if (!newsect->used_by_bfd)
00827 return FALSE;
00828 oasys_per_section (newsect)->data = (bfd_byte *) NULL;
00829 oasys_per_section (newsect)->section = newsect;
00830 oasys_per_section (newsect)->offset = 0;
00831 oasys_per_section (newsect)->initialized = FALSE;
00832 newsect->alignment_power = 1;
00833
00834
00835 sscanf (newsect->name, "%u", &newsect->target_index);
00836
00837 return TRUE;
00838 }
00839
00840
00841 static long
00842 oasys_get_reloc_upper_bound (abfd, asect)
00843 bfd *abfd;
00844 sec_ptr asect;
00845 {
00846 if (! oasys_slurp_section_data (abfd))
00847 return -1;
00848 return (asect->reloc_count + 1) * sizeof (arelent *);
00849 }
00850
00851 static bfd_boolean
00852 oasys_get_section_contents (abfd, section, location, offset, count)
00853 bfd *abfd;
00854 sec_ptr section;
00855 PTR location;
00856 file_ptr offset;
00857 bfd_size_type count;
00858 {
00859 oasys_per_section_type *p = oasys_per_section (section);
00860 oasys_slurp_section_data (abfd);
00861 if (! p->initialized)
00862 {
00863 (void) memset (location, 0, (size_t) count);
00864 }
00865 else
00866 {
00867 (void) memcpy (location, (PTR) (p->data + offset), (size_t) count);
00868 }
00869 return TRUE;
00870 }
00871
00872
00873 long
00874 oasys_canonicalize_reloc (ignore_abfd, section, relptr, symbols)
00875 bfd *ignore_abfd ATTRIBUTE_UNUSED;
00876 sec_ptr section;
00877 arelent **relptr;
00878 asymbol **symbols ATTRIBUTE_UNUSED;
00879 {
00880 unsigned int reloc_count = 0;
00881 oasys_reloc_type *src = (oasys_reloc_type *) (section->relocation);
00882 while (src != (oasys_reloc_type *) NULL)
00883 {
00884 abort ();
00885
00886 *relptr++ = &src->relent;
00887 src = src->next;
00888 reloc_count++;
00889 }
00890 *relptr = (arelent *) NULL;
00891 return section->reloc_count = reloc_count;
00892 }
00893
00894
00895
00896
00897
00898
00899
00900
00901 static bfd_boolean
00902 oasys_write_record (abfd, type, record, size)
00903 bfd *abfd;
00904 oasys_record_enum_type type;
00905 oasys_record_union_type *record;
00906 size_t size;
00907 {
00908 int checksum;
00909 size_t i;
00910 unsigned char *ptr;
00911
00912 record->header.length = size;
00913 record->header.type = (int) type;
00914 record->header.check_sum = 0;
00915 record->header.fill = 0;
00916 ptr = (unsigned char *) &record->pad[0];
00917 checksum = 0;
00918 for (i = 0; i < size; i++)
00919 {
00920 checksum += *ptr++;
00921 }
00922 record->header.check_sum = 0xff & (-checksum);
00923 if (bfd_bwrite ((PTR) record, (bfd_size_type) size, abfd) != size)
00924 return FALSE;
00925 return TRUE;
00926 }
00927
00928
00929
00930 static bfd_boolean
00931 oasys_write_syms (abfd)
00932 bfd *abfd;
00933 {
00934 unsigned int count;
00935 asymbol **generic = bfd_get_outsymbols (abfd);
00936 unsigned int index = 0;
00937 for (count = 0; count < bfd_get_symcount (abfd); count++)
00938 {
00939
00940 oasys_symbol_record_type symbol;
00941 asymbol *const g = generic[count];
00942
00943 const char *src = g->name;
00944 char *dst = symbol.name;
00945 unsigned int l = 0;
00946
00947 if (bfd_is_com_section (g->section))
00948 {
00949 symbol.relb = RELOCATION_TYPE_COM;
00950 H_PUT_16 (abfd, index, symbol.refno);
00951 index++;
00952 }
00953 else if (bfd_is_abs_section (g->section))
00954 {
00955 symbol.relb = RELOCATION_TYPE_ABS;
00956 H_PUT_16 (abfd, 0, symbol.refno);
00957
00958 }
00959 else if (bfd_is_und_section (g->section))
00960 {
00961 symbol.relb = RELOCATION_TYPE_UND;
00962 H_PUT_16 (abfd, index, symbol.refno);
00963
00964 index++;
00965 }
00966 else if (g->flags & BSF_DEBUGGING)
00967 {
00968
00969 continue;
00970 }
00971 else
00972 {
00973 if (g->section == (asection *) NULL)
00974 {
00975
00976
00977
00978 symbol.relb = RELOCATION_TYPE_REL | 0;
00979 }
00980 else
00981 {
00982 symbol.relb = RELOCATION_TYPE_REL | g->section->output_section->target_index;
00983 }
00984 H_PUT_16 (abfd, 0, symbol.refno);
00985 }
00986 #ifdef UNDERSCORE_HACK
00987 if (src[l] == '_')
00988 dst[l++] = '.';
00989 #endif
00990 while (src[l])
00991 {
00992 dst[l] = src[l];
00993 l++;
00994 }
00995
00996 H_PUT_32 (abfd, g->value, symbol.value);
00997
00998
00999 if (g->flags & BSF_LOCAL)
01000 {
01001 if (! oasys_write_record (abfd,
01002 oasys_record_is_local_enum,
01003 (oasys_record_union_type *) & symbol,
01004 offsetof (oasys_symbol_record_type,
01005 name[0]) + l))
01006 return FALSE;
01007 }
01008 else
01009 {
01010 if (! oasys_write_record (abfd,
01011 oasys_record_is_symbol_enum,
01012 (oasys_record_union_type *) & symbol,
01013 offsetof (oasys_symbol_record_type,
01014 name[0]) + l))
01015 return FALSE;
01016 }
01017 g->value = index - 1;
01018 }
01019
01020 return TRUE;
01021 }
01022
01023
01024
01025 static bfd_boolean
01026 oasys_write_sections (abfd)
01027 bfd *abfd;
01028 {
01029 asection *s;
01030 static oasys_section_record_type out;
01031
01032 for (s = abfd->sections; s != (asection *) NULL; s = s->next)
01033 {
01034 if (!ISDIGIT (s->name[0]))
01035 {
01036 (*_bfd_error_handler)
01037 (_("%s: can not represent section `%s' in oasys"),
01038 bfd_get_filename (abfd), s->name);
01039 bfd_set_error (bfd_error_nonrepresentable_section);
01040 return FALSE;
01041 }
01042 out.relb = RELOCATION_TYPE_REL | s->target_index;
01043 H_PUT_32 (abfd, s->size, out.value);
01044 H_PUT_32 (abfd, s->vma, out.vma);
01045
01046 if (! oasys_write_record (abfd,
01047 oasys_record_is_section_enum,
01048 (oasys_record_union_type *) & out,
01049 sizeof (out)))
01050 return FALSE;
01051 }
01052 return TRUE;
01053 }
01054
01055 static bfd_boolean
01056 oasys_write_header (abfd)
01057 bfd *abfd;
01058 {
01059
01060 oasys_header_record_type r;
01061 size_t length = strlen (abfd->filename);
01062 if (length > (size_t) sizeof (r.module_name))
01063 {
01064 length = sizeof (r.module_name);
01065 }
01066
01067 (void) memcpy (r.module_name,
01068 abfd->filename,
01069 length);
01070 (void) memset (r.module_name + length,
01071 ' ',
01072 sizeof (r.module_name) - length);
01073
01074 r.version_number = OASYS_VERSION_NUMBER;
01075 r.rev_number = OASYS_REV_NUMBER;
01076 if (! oasys_write_record (abfd,
01077 oasys_record_is_header_enum,
01078 (oasys_record_union_type *) & r,
01079 offsetof (oasys_header_record_type,
01080 description[0])))
01081 return FALSE;
01082
01083 return TRUE;
01084 }
01085
01086 static bfd_boolean
01087 oasys_write_end (abfd)
01088 bfd *abfd;
01089 {
01090 oasys_end_record_type end;
01091 unsigned char null = 0;
01092 end.relb = RELOCATION_TYPE_ABS;
01093 H_PUT_32 (abfd, abfd->start_address, end.entry);
01094 H_PUT_16 (abfd, 0, end.fill);
01095 end.zero = 0;
01096 if (! oasys_write_record (abfd,
01097 oasys_record_is_end_enum,
01098 (oasys_record_union_type *) & end,
01099 sizeof (end)))
01100 return FALSE;
01101 if (bfd_bwrite ((PTR) &null, (bfd_size_type) 1, abfd) != 1)
01102 return FALSE;
01103 return TRUE;
01104 }
01105
01106 static int
01107 comp (ap, bp)
01108 const PTR ap;
01109 const PTR bp;
01110 {
01111 arelent *a = *((arelent **) ap);
01112 arelent *b = *((arelent **) bp);
01113 return a->address - b->address;
01114 }
01115
01116
01117
01118
01119
01120 static bfd_boolean
01121 oasys_write_data (abfd)
01122 bfd *abfd;
01123 {
01124 asection *s;
01125 for (s = abfd->sections; s != (asection *) NULL; s = s->next)
01126 {
01127 if (s->flags & SEC_LOAD)
01128 {
01129 bfd_byte *raw_data = oasys_per_section (s)->data;
01130 oasys_data_record_type processed_data;
01131 bfd_size_type current_byte_index = 0;
01132 unsigned int relocs_to_go = s->reloc_count;
01133 arelent **p = s->orelocation;
01134 if (s->reloc_count != 0)
01135 {
01136
01137
01138
01139 qsort (s->orelocation,
01140 s->reloc_count,
01141 sizeof (arelent **),
01142 comp);
01143 }
01144 current_byte_index = 0;
01145 processed_data.relb = s->target_index | RELOCATION_TYPE_REL;
01146
01147 while (current_byte_index < s->size)
01148 {
01149
01150
01151 bfd_byte *mod = &processed_data.data[0];
01152 bfd_byte *dst = &processed_data.data[1];
01153
01154 unsigned int i = 0;
01155 *mod = 0;
01156
01157
01158 H_PUT_32 (abfd, s->vma + current_byte_index,
01159 processed_data.addr);
01160
01161
01162
01163
01164
01165
01166
01167
01168 while (current_byte_index < s->size && dst <=
01169 &processed_data.data[sizeof (processed_data.data) - 8])
01170 {
01171
01172
01173 if (relocs_to_go != 0)
01174 {
01175 arelent *r = *p;
01176 reloc_howto_type *const how = r->howto;
01177
01178 if (r->address == current_byte_index)
01179 {
01180 unsigned char rel_byte;
01181
01182 p++;
01183 relocs_to_go--;
01184
01185 *mod |= (1 << i);
01186 if (how->pc_relative)
01187 {
01188 rel_byte = RELOCATION_PCREL_BIT;
01189
01190
01191
01192 if (how->size != 2)
01193 {
01194 bfd_put_16 (abfd,
01195 bfd_get_16 (abfd, raw_data) +
01196 current_byte_index, raw_data);
01197 }
01198
01199 else
01200 {
01201 bfd_put_32 (abfd,
01202 bfd_get_32 (abfd, raw_data) +
01203 current_byte_index, raw_data);
01204 }
01205 }
01206 else
01207 {
01208 rel_byte = 0;
01209 }
01210 if (how->size == 2)
01211 {
01212 rel_byte |= RELOCATION_32BIT_BIT;
01213 }
01214
01215
01216
01217 abort ();
01218
01219 {
01220 asymbol *sym = *(r->sym_ptr_ptr);
01221
01222
01223
01224
01225 if (sym->section != (asection *) NULL)
01226 {
01227 rel_byte |= RELOCATION_TYPE_REL;
01228 rel_byte |=
01229 sym->section->output_section->target_index;
01230 *dst++ = rel_byte;
01231 }
01232 else
01233 {
01234 rel_byte |= RELOCATION_TYPE_UND;
01235 *dst++ = rel_byte;
01236
01237
01238
01239
01240
01241 *dst++ = sym->value >> 8;
01242 *dst++ = sym->value;
01243 }
01244 }
01245 #define ADVANCE { if (++i >= 8) { i = 0; mod = dst++; *mod = 0; } current_byte_index++; }
01246
01247
01248
01249 *dst++ = *raw_data++;
01250 ADVANCE
01251 * dst++ = *raw_data++;
01252 ADVANCE
01253 if (how->size == 2)
01254 {
01255 *dst++ = *raw_data++;
01256 ADVANCE
01257 * dst++ = *raw_data++;
01258 ADVANCE
01259 }
01260 continue;
01261 }
01262 }
01263
01264
01265 if (raw_data == NULL)
01266 {
01267 *dst++ = 0;
01268 }
01269 else
01270 {
01271 *dst++ = *raw_data++;
01272 }
01273 ADVANCE
01274 }
01275
01276
01277 if (dst == mod + 1)
01278 {
01279 --dst;
01280 }
01281
01282 if (! (oasys_write_record
01283 (abfd, oasys_record_is_data_enum,
01284 ((oasys_record_union_type *) &processed_data),
01285 (size_t) (dst - (bfd_byte *) &processed_data))))
01286 return FALSE;
01287 }
01288 }
01289 }
01290
01291 return TRUE;
01292 }
01293
01294 static bfd_boolean
01295 oasys_write_object_contents (abfd)
01296 bfd *abfd;
01297 {
01298 if (! oasys_write_header (abfd))
01299 return FALSE;
01300 if (! oasys_write_syms (abfd))
01301 return FALSE;
01302 if (! oasys_write_sections (abfd))
01303 return FALSE;
01304 if (! oasys_write_data (abfd))
01305 return FALSE;
01306 if (! oasys_write_end (abfd))
01307 return FALSE;
01308 return TRUE;
01309 }
01310
01311
01312
01313
01316
01317
01318
01319 static bfd_boolean
01320 oasys_set_section_contents (abfd, section, location, offset, count)
01321 bfd *abfd;
01322 sec_ptr section;
01323 const PTR location;
01324 file_ptr offset;
01325 bfd_size_type count;
01326 {
01327 if (count != 0)
01328 {
01329 if (oasys_per_section (section)->data == (bfd_byte *) NULL)
01330 {
01331 oasys_per_section (section)->data =
01332 (bfd_byte *) (bfd_alloc (abfd, section->size));
01333 if (!oasys_per_section (section)->data)
01334 return FALSE;
01335 }
01336 (void) memcpy ((PTR) (oasys_per_section (section)->data + offset),
01337 location,
01338 (size_t) count);
01339 }
01340 return TRUE;
01341 }
01342
01343
01344
01345
01346
01347
01348
01349
01350
01351 static asymbol *
01352 oasys_make_empty_symbol (abfd)
01353 bfd *abfd;
01354 {
01355 bfd_size_type amt = sizeof (oasys_symbol_type);
01356 oasys_symbol_type *new = (oasys_symbol_type *) bfd_zalloc (abfd, amt);
01357 if (!new)
01358 return NULL;
01359 new->symbol.the_bfd = abfd;
01360 return &new->symbol;
01361 }
01362
01363
01364
01365
01366
01367
01368
01369 static bfd *
01370 oasys_openr_next_archived_file (arch, prev)
01371 bfd *arch;
01372 bfd *prev;
01373 {
01374 oasys_ar_data_type *ar = OASYS_AR_DATA (arch);
01375 oasys_module_info_type *p;
01376
01377 if (prev == (bfd *) NULL)
01378 {
01379
01380 ar->module_index = 0;
01381 }
01382
01383 p = ar->module + ar->module_index;
01384 ar->module_index++;
01385
01386 if (ar->module_index <= ar->module_count)
01387 {
01388 if (p->abfd == (bfd *) NULL)
01389 {
01390 p->abfd = _bfd_create_empty_archive_element_shell (arch);
01391 p->abfd->origin = p->pos;
01392 p->abfd->filename = p->name;
01393
01394
01395 p->abfd->arelt_data = (PTR) p;
01396 }
01397 return p->abfd;
01398 }
01399 else
01400 {
01401 bfd_set_error (bfd_error_no_more_archived_files);
01402 return (bfd *) NULL;
01403 }
01404 }
01405
01406 static bfd_boolean
01407 oasys_find_nearest_line (abfd, section, symbols, offset,
01408 filename_ptr, functionname_ptr, line_ptr)
01409 bfd *abfd ATTRIBUTE_UNUSED;
01410 asection *section ATTRIBUTE_UNUSED;
01411 asymbol **symbols ATTRIBUTE_UNUSED;
01412 bfd_vma offset ATTRIBUTE_UNUSED;
01413 const char **filename_ptr ATTRIBUTE_UNUSED;
01414 const char **functionname_ptr ATTRIBUTE_UNUSED;
01415 unsigned int *line_ptr ATTRIBUTE_UNUSED;
01416 {
01417 return FALSE;
01418
01419 }
01420
01421 static int
01422 oasys_generic_stat_arch_elt (abfd, buf)
01423 bfd *abfd;
01424 struct stat *buf;
01425 {
01426 oasys_module_info_type *mod = (oasys_module_info_type *) abfd->arelt_data;
01427 if (mod == (oasys_module_info_type *) NULL)
01428 {
01429 bfd_set_error (bfd_error_invalid_operation);
01430 return -1;
01431 }
01432 else
01433 {
01434 buf->st_size = mod->size;
01435 buf->st_mode = 0666;
01436 return 0;
01437 }
01438 }
01439
01440 static int
01441 oasys_sizeof_headers (abfd, exec)
01442 bfd *abfd ATTRIBUTE_UNUSED;
01443 bfd_boolean exec ATTRIBUTE_UNUSED;
01444 {
01445 return 0;
01446 }
01447
01448 #define oasys_close_and_cleanup _bfd_generic_close_and_cleanup
01449 #define oasys_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
01450
01451 #define oasys_slurp_armap bfd_true
01452 #define oasys_slurp_extended_name_table bfd_true
01453 #define oasys_construct_extended_name_table \
01454 ((bfd_boolean (*) PARAMS ((bfd *, char **, bfd_size_type *, const char **))) \
01455 bfd_true)
01456 #define oasys_truncate_arname bfd_dont_truncate_arname
01457 #define oasys_write_armap \
01458 ((bfd_boolean (*) \
01459 PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int))) \
01460 bfd_true)
01461 #define oasys_read_ar_hdr bfd_nullvoidptr
01462 #define oasys_get_elt_at_index _bfd_generic_get_elt_at_index
01463 #define oasys_update_armap_timestamp bfd_true
01464
01465 #define oasys_bfd_is_local_label_name bfd_generic_is_local_label_name
01466 #define oasys_bfd_is_target_special_symbol ((bfd_boolean (*) (bfd *, asymbol *)) bfd_false)
01467 #define oasys_get_lineno _bfd_nosymbols_get_lineno
01468 #define oasys_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
01469 #define oasys_read_minisymbols _bfd_generic_read_minisymbols
01470 #define oasys_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
01471
01472 #define oasys_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
01473
01474 #define oasys_set_arch_mach bfd_default_set_arch_mach
01475
01476 #define oasys_get_section_contents_in_window \
01477 _bfd_generic_get_section_contents_in_window
01478
01479 #define oasys_bfd_get_relocated_section_contents \
01480 bfd_generic_get_relocated_section_contents
01481 #define oasys_bfd_relax_section bfd_generic_relax_section
01482 #define oasys_bfd_gc_sections bfd_generic_gc_sections
01483 #define oasys_bfd_merge_sections bfd_generic_merge_sections
01484 #define oasys_bfd_is_group_section bfd_generic_is_group_section
01485 #define oasys_bfd_discard_group bfd_generic_discard_group
01486 #define oasys_section_already_linked \
01487 _bfd_generic_section_already_linked
01488 #define oasys_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
01489 #define oasys_bfd_link_hash_table_free _bfd_generic_link_hash_table_free
01490 #define oasys_bfd_link_add_symbols _bfd_generic_link_add_symbols
01491 #define oasys_bfd_link_just_syms _bfd_generic_link_just_syms
01492 #define oasys_bfd_final_link _bfd_generic_final_link
01493 #define oasys_bfd_link_split_section _bfd_generic_link_split_section
01494
01495
01496 const bfd_target oasys_vec =
01497 {
01498 "oasys",
01499 bfd_target_oasys_flavour,
01500 BFD_ENDIAN_BIG,
01501 BFD_ENDIAN_BIG,
01502 (HAS_RELOC | EXEC_P |
01503 HAS_LINENO | HAS_DEBUG |
01504 HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
01505 (SEC_CODE | SEC_DATA | SEC_ROM | SEC_HAS_CONTENTS
01506 | SEC_ALLOC | SEC_LOAD | SEC_RELOC),
01507 0,
01508 ' ',
01509 16,
01510 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
01511 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
01512 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
01513 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
01514 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
01515 bfd_getb16, bfd_getb_signed_16, bfd_putb16,
01516
01517 {_bfd_dummy_target,
01518 oasys_object_p,
01519 oasys_archive_p,
01520 _bfd_dummy_target,
01521 },
01522 {
01523 bfd_false,
01524 oasys_mkobject,
01525 _bfd_generic_mkarchive,
01526 bfd_false
01527 },
01528 {
01529 bfd_false,
01530 oasys_write_object_contents,
01531 _bfd_write_archive_contents,
01532 bfd_false,
01533 },
01534
01535 BFD_JUMP_TABLE_GENERIC (oasys),
01536 BFD_JUMP_TABLE_COPY (_bfd_generic),
01537 BFD_JUMP_TABLE_CORE (_bfd_nocore),
01538 BFD_JUMP_TABLE_ARCHIVE (oasys),
01539 BFD_JUMP_TABLE_SYMBOLS (oasys),
01540 BFD_JUMP_TABLE_RELOCS (oasys),
01541 BFD_JUMP_TABLE_WRITE (oasys),
01542 BFD_JUMP_TABLE_LINK (oasys),
01543 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
01544
01545 NULL,
01546
01547 (PTR) 0
01548 };