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 #define SH64_ELF
00026
00027 #include "bfd.h"
00028 #include "sysdep.h"
00029 #include "elf-bfd.h"
00030 #include "../opcodes/sh64-opc.h"
00031 #include "elf32-sh64.h"
00032
00033
00034
00035
00036
00037 #define DATALABEL_SUFFIX " DL"
00038
00039
00040 struct sh64_find_section_vma_data
00041 {
00042 asection *section;
00043 bfd_vma addr;
00044 };
00045
00046 static bfd_boolean sh64_elf_new_section_hook
00047 (bfd *, asection *);
00048 static bfd_boolean sh64_elf_copy_private_data
00049 (bfd *, bfd *);
00050 static bfd_boolean sh64_elf_merge_private_data
00051 (bfd *, bfd *);
00052 static bfd_boolean sh64_elf_fake_sections
00053 (bfd *, Elf_Internal_Shdr *, asection *);
00054 static bfd_boolean sh64_elf_set_private_flags
00055 (bfd *, flagword);
00056 static bfd_boolean sh64_elf_set_mach_from_flags
00057 (bfd *);
00058 static bfd_boolean shmedia_prepare_reloc
00059 (struct bfd_link_info *, bfd *, asection *, bfd_byte *,
00060 const Elf_Internal_Rela *, bfd_vma *);
00061 static int sh64_elf_get_symbol_type
00062 (Elf_Internal_Sym *, int);
00063 static bfd_boolean sh64_elf_add_symbol_hook
00064 (bfd *, struct bfd_link_info *, Elf_Internal_Sym *, const char **,
00065 flagword *, asection **, bfd_vma *);
00066 static bfd_boolean sh64_elf_link_output_symbol_hook
00067 (struct bfd_link_info *, const char *, Elf_Internal_Sym *, asection *,
00068 struct elf_link_hash_entry *);
00069 static bfd_boolean sh64_backend_section_from_shdr
00070 (bfd *, Elf_Internal_Shdr *, const char *);
00071 static void sh64_elf_final_write_processing
00072 (bfd *, bfd_boolean);
00073 static bfd_boolean sh64_bfd_elf_copy_private_section_data
00074 (bfd *, asection *, bfd *, asection *);
00075 static void sh64_find_section_for_address
00076 (bfd *, asection *, void *);
00077
00078
00079
00080 #define sh_elf_copy_private_data sh64_elf_copy_private_data
00081 #define sh_elf_merge_private_data sh64_elf_merge_private_data
00082 #define sh_elf_set_private_flags sh64_elf_set_private_flags
00083
00084 #define bfd_elf32_bfd_set_private_flags sh64_elf_set_private_flags
00085 #define sh_elf_set_mach_from_flags sh64_elf_set_mach_from_flags
00086
00087 #define elf_backend_sign_extend_vma 1
00088 #define elf_backend_fake_sections sh64_elf_fake_sections
00089 #define elf_backend_get_symbol_type sh64_elf_get_symbol_type
00090 #define elf_backend_add_symbol_hook sh64_elf_add_symbol_hook
00091 #define elf_backend_link_output_symbol_hook \
00092 sh64_elf_link_output_symbol_hook
00093 #define elf_backend_merge_symbol_attribute sh64_elf_merge_symbol_attribute
00094 #define elf_backend_final_write_processing sh64_elf_final_write_processing
00095 #define elf_backend_section_from_shdr sh64_backend_section_from_shdr
00096 #define elf_backend_special_sections sh64_elf_special_sections
00097 #define elf_backend_section_flags sh64_elf_section_flags
00098
00099 #define bfd_elf32_new_section_hook sh64_elf_new_section_hook
00100
00101
00102
00103
00104 #define bfd_elf32_bfd_copy_private_section_data \
00105 sh64_bfd_elf_copy_private_section_data
00106
00107
00108
00109
00110 #define _bfd_sh_align_load_span(a,b,c,d,e,f,g,h,i,j) TRUE
00111
00112 #define GOT_BIAS (-((long)-32768))
00113 #define INCLUDE_SHMEDIA
00114 #define SH_TARGET_ALREADY_DEFINED
00115 #include "elf32-sh.c"
00116
00117
00118
00119 static bfd_boolean
00120 sh64_elf_new_section_hook (bfd *abfd, asection *sec)
00121 {
00122 struct _sh64_elf_section_data *sdata;
00123 bfd_size_type amt = sizeof (*sdata);
00124
00125 sdata = (struct _sh64_elf_section_data *) bfd_zalloc (abfd, amt);
00126 if (sdata == NULL)
00127 return FALSE;
00128 sec->used_by_bfd = sdata;
00129
00130 return _bfd_elf_new_section_hook (abfd, sec);
00131 }
00132
00133
00134
00135
00136 bfd_boolean
00137 sh64_elf_fake_sections (bfd *output_bfd ATTRIBUTE_UNUSED,
00138 Elf_Internal_Shdr *elf_section_hdr,
00139 asection *asect)
00140 {
00141 if (sh64_elf_section_data (asect)->sh64_info != NULL)
00142 elf_section_hdr->sh_flags
00143 |= sh64_elf_section_data (asect)->sh64_info->contents_flags;
00144
00145
00146
00147 if ((bfd_get_section_flags (output_bfd, asect) & SEC_SORT_ENTRIES) != 0
00148 && strcmp (bfd_get_section_name (output_bfd, asect),
00149 SH64_CRANGES_SECTION_NAME) == 0)
00150 elf_section_hdr->sh_type = SHT_SH5_CR_SORTED;
00151
00152 return TRUE;
00153 }
00154
00155 static bfd_boolean
00156 sh64_elf_set_mach_from_flags (bfd *abfd)
00157 {
00158 flagword flags = elf_elfheader (abfd)->e_flags;
00159
00160 switch (flags & EF_SH_MACH_MASK)
00161 {
00162 case EF_SH5:
00163
00164
00165 bfd_default_set_arch_mach (abfd, bfd_arch_sh, bfd_mach_sh5);
00166 break;
00167
00168 default:
00169 bfd_set_error (bfd_error_wrong_format);
00170 return FALSE;
00171 }
00172
00173 return TRUE;
00174 }
00175
00176 static bfd_boolean
00177 sh64_elf_section_flags (flagword *flags,
00178 const Elf_Internal_Shdr *hdr)
00179 {
00180 if (hdr->bfd_section == NULL)
00181 return FALSE;
00182
00183 if (strcmp (hdr->bfd_section->name, SH64_CRANGES_SECTION_NAME) == 0)
00184 *flags |= SEC_DEBUGGING;
00185
00186 return TRUE;
00187 }
00188
00189 static bfd_boolean
00190 sh64_elf_copy_private_data (bfd * ibfd, bfd * obfd)
00191 {
00192 if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
00193 || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
00194 return TRUE;
00195
00196 BFD_ASSERT (!elf_flags_init (obfd)
00197 || (elf_elfheader (obfd)->e_flags
00198 == elf_elfheader (ibfd)->e_flags));
00199
00200 elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
00201 return TRUE;
00202 }
00203
00204 static bfd_boolean
00205 sh64_elf_merge_private_data (bfd *ibfd, bfd *obfd)
00206 {
00207 flagword old_flags, new_flags;
00208
00209 if (! _bfd_generic_verify_endian_match (ibfd, obfd))
00210 return FALSE;
00211
00212 if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
00213 || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
00214 return TRUE;
00215
00216 if (bfd_get_arch_size (ibfd) != bfd_get_arch_size (obfd))
00217 {
00218 const char *msg;
00219
00220 if (bfd_get_arch_size (ibfd) == 32
00221 && bfd_get_arch_size (obfd) == 64)
00222 msg = _("%s: compiled as 32-bit object and %s is 64-bit");
00223 else if (bfd_get_arch_size (ibfd) == 64
00224 && bfd_get_arch_size (obfd) == 32)
00225 msg = _("%s: compiled as 64-bit object and %s is 32-bit");
00226 else
00227 msg = _("%s: object size does not match that of target %s");
00228
00229 (*_bfd_error_handler) (msg, bfd_get_filename (ibfd),
00230 bfd_get_filename (obfd));
00231 bfd_set_error (bfd_error_wrong_format);
00232 return FALSE;
00233 }
00234
00235 old_flags = elf_elfheader (obfd)->e_flags;
00236 new_flags = elf_elfheader (ibfd)->e_flags;
00237 if (! elf_flags_init (obfd))
00238 {
00239
00240 elf_flags_init (obfd) = TRUE;
00241 elf_elfheader (obfd)->e_flags = old_flags = new_flags;
00242 }
00243
00244 else if ((new_flags & EF_SH_MACH_MASK) != EF_SH5)
00245 {
00246 (*_bfd_error_handler)
00247 ("%s: uses non-SH64 instructions while previous modules use SH64 instructions",
00248 bfd_get_filename (ibfd));
00249 bfd_set_error (bfd_error_bad_value);
00250 return FALSE;
00251 }
00252
00253
00254
00255 elf_elfheader (obfd)->e_flags = old_flags;
00256 return sh64_elf_set_mach_from_flags (obfd);
00257 }
00258
00259
00260
00261
00262
00263
00264 bfd_boolean
00265 sh64_backend_section_from_shdr (bfd *abfd, Elf_Internal_Shdr *hdr,
00266 const char *name)
00267 {
00268 flagword flags = 0;
00269
00270
00271
00272
00273 switch (hdr->sh_type)
00274 {
00275 case SHT_SH5_CR_SORTED:
00276 if (strcmp (name, SH64_CRANGES_SECTION_NAME) != 0)
00277 return FALSE;
00278
00279
00280
00281
00282
00283
00284 flags = SEC_DEBUGGING | SEC_SORT_ENTRIES;
00285 break;
00286
00287 default:
00288 return FALSE;
00289 }
00290
00291 if (! _bfd_elf_make_section_from_shdr (abfd, hdr, name))
00292 return FALSE;
00293
00294 if (flags
00295 && ! bfd_set_section_flags (abfd, hdr->bfd_section,
00296 bfd_get_section_flags (abfd,
00297 hdr->bfd_section)
00298 | flags))
00299 return FALSE;
00300
00301 return TRUE;
00302 }
00303
00304
00305
00306
00307
00308
00309 bfd_boolean
00310 sh64_bfd_elf_copy_private_section_data (bfd *ibfd, asection *isec,
00311 bfd *obfd, asection *osec)
00312 {
00313 struct sh64_section_data *sh64_sec_data;
00314
00315 if (ibfd->xvec->flavour != bfd_target_elf_flavour
00316 || obfd->xvec->flavour != bfd_target_elf_flavour)
00317 return TRUE;
00318
00319 if (! _bfd_elf_copy_private_section_data (ibfd, isec, obfd, osec))
00320 return FALSE;
00321
00322 sh64_sec_data = sh64_elf_section_data (isec)->sh64_info;
00323 if (sh64_sec_data == NULL)
00324 {
00325 sh64_sec_data = bfd_zmalloc (sizeof (struct sh64_section_data));
00326
00327 if (sh64_sec_data == NULL)
00328 return FALSE;
00329
00330 sh64_sec_data->contents_flags
00331 = (elf_section_data (isec)->this_hdr.sh_flags
00332 & (SHF_SH5_ISA32 | SHF_SH5_ISA32_MIXED));
00333
00334 sh64_elf_section_data (osec)->sh64_info = sh64_sec_data;
00335 }
00336
00337 return TRUE;
00338 }
00339
00340
00341
00342 static bfd_boolean
00343 sh64_elf_set_private_flags (bfd *abfd, flagword flags)
00344 {
00345 BFD_ASSERT (! elf_flags_init (abfd)
00346 || elf_elfheader (abfd)->e_flags == flags);
00347
00348 elf_elfheader (abfd)->e_flags = flags;
00349 elf_flags_init (abfd) = TRUE;
00350 return sh64_elf_set_mach_from_flags (abfd);
00351 }
00352
00353
00354
00355 static int
00356 sh64_elf_get_symbol_type (Elf_Internal_Sym *elf_sym, int type)
00357 {
00358 if (ELF_ST_TYPE (elf_sym->st_info) == STT_DATALABEL)
00359 return STT_DATALABEL;
00360
00361 return type;
00362 }
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372
00373
00374
00375
00376
00377
00378
00379
00380
00381
00382 static bfd_boolean
00383 sh64_elf_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
00384 Elf_Internal_Sym *sym, const char **namep,
00385 flagword *flagsp ATTRIBUTE_UNUSED,
00386 asection **secp, bfd_vma *valp)
00387 {
00388
00389 if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL
00390 && is_elf_hash_table (info->hash))
00391 {
00392 struct elf_link_hash_entry *h;
00393
00394
00395
00396
00397 flagword flags
00398 = info->relocatable || info->emitrelocations
00399 ? BSF_GLOBAL : BSF_GLOBAL | BSF_INDIRECT;
00400
00401 char *dl_name
00402 = bfd_malloc (strlen (*namep) + sizeof (DATALABEL_SUFFIX));
00403 struct elf_link_hash_entry ** sym_hash = elf_sym_hashes (abfd);
00404
00405 BFD_ASSERT (sym_hash != NULL);
00406
00407
00408 if (dl_name == NULL)
00409 return FALSE;
00410
00411 strcpy (dl_name, *namep);
00412 strcat (dl_name, DATALABEL_SUFFIX);
00413
00414 h = (struct elf_link_hash_entry *)
00415 bfd_link_hash_lookup (info->hash, dl_name, FALSE, FALSE, FALSE);
00416
00417 if (h == NULL)
00418 {
00419
00420 struct bfd_link_hash_entry *bh = NULL;
00421 const struct elf_backend_data *bed = get_elf_backend_data (abfd);
00422
00423 if (! _bfd_generic_link_add_one_symbol (info, abfd, dl_name,
00424 flags, *secp, *valp,
00425 *namep, FALSE,
00426 bed->collect, &bh))
00427 {
00428 free (dl_name);
00429 return FALSE;
00430 }
00431
00432 h = (struct elf_link_hash_entry *) bh;
00433 h->non_elf = 0;
00434 h->type = STT_DATALABEL;
00435 }
00436 else
00437
00438
00439 free (dl_name);
00440
00441 if (h->type != STT_DATALABEL
00442 || ((info->relocatable || info->emitrelocations)
00443 && h->root.type != bfd_link_hash_undefined)
00444 || (! info->relocatable && !info->emitrelocations
00445 && h->root.type != bfd_link_hash_indirect))
00446 {
00447
00448 (*_bfd_error_handler)
00449 (_("%s: encountered datalabel symbol in input"),
00450 bfd_get_filename (abfd));
00451 bfd_set_error (bfd_error_bad_value);
00452 return FALSE;
00453 }
00454
00455
00456 while (*sym_hash != NULL)
00457 sym_hash++;
00458 *sym_hash = h;
00459
00460
00461 *namep = NULL;
00462 }
00463
00464 return TRUE;
00465 }
00466
00467
00468
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479 bfd_boolean
00480 sh64_elf_link_output_symbol_hook (struct bfd_link_info *info,
00481 const char *cname,
00482 Elf_Internal_Sym *sym,
00483 asection *input_sec ATTRIBUTE_UNUSED,
00484 struct elf_link_hash_entry *h ATTRIBUTE_UNUSED)
00485 {
00486 char *name = (char *) cname;
00487
00488 if (info->relocatable || info->emitrelocations)
00489 {
00490 if (ELF_ST_TYPE (sym->st_info) == STT_DATALABEL)
00491 name[strlen (name) - strlen (DATALABEL_SUFFIX)] = 0;
00492 }
00493
00494 return TRUE;
00495 }
00496
00497
00498
00499
00500
00501 static bfd_boolean
00502 shmedia_prepare_reloc (struct bfd_link_info *info, bfd *abfd,
00503 asection *input_section, bfd_byte *contents,
00504 const Elf_Internal_Rela *rel, bfd_vma *relocation)
00505 {
00506 bfd_vma disp, dropped;
00507
00508 switch (ELF32_R_TYPE (rel->r_info))
00509 {
00510 case R_SH_PT_16:
00511
00512
00513
00514
00515
00516
00517 {
00518 char *msg = NULL;
00519 bfd_vma insn = bfd_get_32 (abfd, contents + rel->r_offset);
00520
00521 if (insn & (1 << 10))
00522 {
00523
00524 if ((insn & SHMEDIA_PTB_BIT) != 0
00525 && ((*relocation + rel->r_addend) & 1) != 0)
00526 msg = _("PTB mismatch: a SHmedia address (bit 0 == 1)");
00527 else if ((insn & SHMEDIA_PTB_BIT) == 0
00528 && ((*relocation + rel->r_addend) & 1) == 0)
00529 msg = _("PTA mismatch: a SHcompact address (bit 0 == 0)");
00530
00531 if (msg != NULL
00532 && ! ((*info->callbacks->reloc_dangerous)
00533 (info, msg, abfd, input_section,
00534 rel->r_offset)))
00535 return FALSE;
00536 }
00537 else
00538 {
00539
00540
00541
00542
00543
00544 if ((insn & SHMEDIA_PTB_BIT) != 0)
00545 {
00546 (*_bfd_error_handler)
00547 (_("%s: GAS error: unexpected PTB insn with R_SH_PT_16"),
00548 bfd_get_filename (input_section->owner));
00549 return FALSE;
00550 }
00551
00552
00553 if (((*relocation + rel->r_addend) & 1) == 0)
00554 bfd_put_32 (abfd, insn | SHMEDIA_PTB_BIT,
00555 contents + rel->r_offset);
00556 }
00557 }
00558
00559 case R_SH_SHMEDIA_CODE:
00560 case R_SH_DIR5U:
00561 case R_SH_DIR6S:
00562 case R_SH_DIR6U:
00563 case R_SH_DIR10S:
00564 case R_SH_DIR10SW:
00565 case R_SH_DIR10SL:
00566 case R_SH_DIR10SQ:
00567 case R_SH_IMMS16:
00568 case R_SH_IMMU16:
00569 case R_SH_IMM_LOW16:
00570 case R_SH_IMM_LOW16_PCREL:
00571 case R_SH_IMM_MEDLOW16:
00572 case R_SH_IMM_MEDLOW16_PCREL:
00573 case R_SH_IMM_MEDHI16:
00574 case R_SH_IMM_MEDHI16_PCREL:
00575 case R_SH_IMM_HI16:
00576 case R_SH_IMM_HI16_PCREL:
00577 case R_SH_64:
00578 case R_SH_64_PCREL:
00579 break;
00580
00581 default:
00582 return FALSE;
00583 }
00584
00585 disp = (*relocation & 0xf);
00586 dropped = 0;
00587 switch (ELF32_R_TYPE (rel->r_info))
00588 {
00589 case R_SH_DIR10SW: dropped = disp & 1; break;
00590 case R_SH_DIR10SL: dropped = disp & 3; break;
00591 case R_SH_DIR10SQ: dropped = disp & 7; break;
00592 }
00593 if (dropped != 0)
00594 {
00595 (*_bfd_error_handler)
00596 (_("%B: error: unaligned relocation type %d at %08x reloc %p\n"),
00597 input_section->owner, ELF32_R_TYPE (rel->r_info),
00598 (unsigned) rel->r_offset, relocation);
00599 return FALSE;
00600 }
00601
00602 return TRUE;
00603 }
00604
00605
00606
00607
00608 static void
00609 sh64_find_section_for_address (bfd *abfd ATTRIBUTE_UNUSED,
00610 asection *section, void *data)
00611 {
00612 bfd_vma vma;
00613 bfd_size_type size;
00614
00615 struct sh64_find_section_vma_data *fsec_datap
00616 = (struct sh64_find_section_vma_data *) data;
00617
00618
00619 if (fsec_datap->section)
00620 return;
00621
00622
00623 if ((bfd_get_section_flags (abfd, section) & SEC_ALLOC) == 0)
00624 return;
00625
00626 vma = bfd_get_section_vma (abfd, section);
00627 if (fsec_datap->addr < vma)
00628 return;
00629
00630 size = section->size;
00631 if (fsec_datap->addr >= vma + size)
00632 return;
00633
00634 fsec_datap->section = section;
00635 }
00636
00637
00638
00639
00640
00641
00642 static void
00643 sh64_elf_final_write_processing (bfd *abfd,
00644 bfd_boolean linker ATTRIBUTE_UNUSED)
00645 {
00646 bfd_vma ld_generated_cranges_size;
00647 asection *cranges
00648 = bfd_get_section_by_name (abfd, SH64_CRANGES_SECTION_NAME);
00649
00650
00651
00652
00653
00654 if (linker
00655 && cranges != NULL
00656 && elf_elfheader (abfd)->e_type != ET_EXEC
00657 && (ld_generated_cranges_size
00658 = sh64_elf_section_data (cranges)->sh64_info->cranges_growth) != 0)
00659 {
00660 bfd_vma incoming_cranges_size
00661 = cranges->size - ld_generated_cranges_size;
00662
00663 if (! bfd_set_section_contents (abfd, cranges,
00664 cranges->contents
00665 + incoming_cranges_size,
00666 cranges->output_offset
00667 + incoming_cranges_size,
00668 ld_generated_cranges_size))
00669 {
00670 bfd_set_error (bfd_error_file_truncated);
00671 (*_bfd_error_handler)
00672 (_("%s: could not write out added .cranges entries"),
00673 bfd_get_filename (abfd));
00674 }
00675 }
00676
00677
00678
00679 if (linker && elf_elfheader (abfd)->e_type == ET_EXEC)
00680 {
00681 struct sh64_find_section_vma_data fsec_data;
00682 sh64_elf_crange dummy;
00683
00684
00685
00686
00687
00688
00689
00690 fsec_data.addr = elf_elfheader (abfd)->e_entry;
00691 fsec_data.section = NULL;
00692
00693 bfd_map_over_sections (abfd, sh64_find_section_for_address,
00694 &fsec_data);
00695 if (fsec_data.section
00696 && (sh64_get_contents_type (fsec_data.section,
00697 elf_elfheader (abfd)->e_entry,
00698 &dummy) == CRT_SH5_ISA32))
00699 elf_elfheader (abfd)->e_entry |= 1;
00700
00701
00702 if (cranges != NULL)
00703 {
00704 bfd_size_type cranges_size = cranges->size;
00705
00706
00707 BFD_ASSERT (cranges->contents != NULL);
00708
00709
00710
00711
00712 if (elf_section_data (cranges)->this_hdr.sh_type
00713 != SHT_SH5_CR_SORTED)
00714 {
00715 qsort (cranges->contents, cranges_size / SH64_CRANGE_SIZE,
00716 SH64_CRANGE_SIZE,
00717 bfd_big_endian (cranges->owner)
00718 ? _bfd_sh64_crange_qsort_cmpb
00719 : _bfd_sh64_crange_qsort_cmpl);
00720 elf_section_data (cranges)->this_hdr.sh_type
00721 = SHT_SH5_CR_SORTED;
00722 }
00723
00724
00725 if (! bfd_set_section_contents (abfd, cranges,
00726 cranges->contents,
00727 cranges->output_offset,
00728 cranges_size))
00729 {
00730 bfd_set_error (bfd_error_file_truncated);
00731 (*_bfd_error_handler)
00732 (_("%s: could not write out sorted .cranges entries"),
00733 bfd_get_filename (abfd));
00734 }
00735 }
00736 }
00737 }
00738
00739
00740
00741 static void
00742 sh64_elf_merge_symbol_attribute (struct elf_link_hash_entry *h,
00743 const Elf_Internal_Sym *isym,
00744 bfd_boolean definition,
00745 bfd_boolean dynamic)
00746 {
00747 if (isym->st_other != 0 && dynamic)
00748 {
00749 unsigned char other;
00750
00751
00752 other = (definition ? isym->st_other : h->other);
00753 other &= ~ ELF_ST_VISIBILITY (-1);
00754 h->other = other | ELF_ST_VISIBILITY (h->other);
00755 }
00756
00757 return;
00758 }
00759
00760 static struct bfd_elf_special_section const sh64_elf_special_sections[]=
00761 {
00762 { ".cranges", 8, 0, SHT_PROGBITS, 0 },
00763 { NULL, 0, 0, 0, 0 }
00764 };
00765
00766 #undef TARGET_BIG_SYM
00767 #define TARGET_BIG_SYM bfd_elf32_sh64_vec
00768 #undef TARGET_BIG_NAME
00769 #define TARGET_BIG_NAME "elf32-sh64"
00770 #undef TARGET_LITTLE_SYM
00771 #define TARGET_LITTLE_SYM bfd_elf32_sh64l_vec
00772 #undef TARGET_LITTLE_NAME
00773 #define TARGET_LITTLE_NAME "elf32-sh64l"
00774
00775 #include "elf32-target.h"
00776
00777
00778 #undef TARGET_BIG_SYM
00779 #define TARGET_BIG_SYM bfd_elf32_sh64nbsd_vec
00780 #undef TARGET_BIG_NAME
00781 #define TARGET_BIG_NAME "elf32-sh64-nbsd"
00782 #undef TARGET_LITTLE_SYM
00783 #define TARGET_LITTLE_SYM bfd_elf32_sh64lnbsd_vec
00784 #undef TARGET_LITTLE_NAME
00785 #define TARGET_LITTLE_NAME "elf32-sh64l-nbsd"
00786 #undef ELF_MAXPAGESIZE
00787 #define ELF_MAXPAGESIZE 0x10000
00788 #undef elf_symbol_leading_char
00789 #define elf_symbol_leading_char 0
00790 #undef elf32_bed
00791 #define elf32_bed elf32_sh64_nbsd_bed
00792
00793 #include "elf32-target.h"
00794
00795
00796 #undef TARGET_BIG_SYM
00797 #define TARGET_BIG_SYM bfd_elf32_sh64blin_vec
00798 #undef TARGET_BIG_NAME
00799 #define TARGET_BIG_NAME "elf32-sh64big-linux"
00800 #undef TARGET_LITTLE_SYM
00801 #define TARGET_LITTLE_SYM bfd_elf32_sh64lin_vec
00802 #undef TARGET_LITTLE_NAME
00803 #define TARGET_LITTLE_NAME "elf32-sh64-linux"
00804 #undef elf32_bed
00805 #define elf32_bed elf32_sh64_lin_bed
00806
00807 #include "elf32-target.h"
00808