source:
rtems-tools/tools/4.11/binutils/moxie/binutils-2.22-rtems4.11-moxie-20130516.diff
@
acdef36
Last change on this file since acdef36 was acdef36, checked in by Amar Takhar <verm@…>, on 05/16/13 at 08:13:31 | |
---|---|
|
|
File size: 16.1 KB |
-
.23.2/bfd/config.bfd
Only in a_binutils-2.23.2: 1.diff Only in a_binutils-2.23.2: 2.diff Only in a_binutils-2.23.2: 3.diff Only in a_binutils-2.23.2: a.diff Only in a_binutils-2.23.2/bfd: ChangeLog.orig Only in a_binutils-2.23.2/bfd: ChangeLog.rej diff -ru binutils-2.23.2/bfd/config.bfd a_binutils-2.23.2/bfd/config.bfd
old new 419 419 ;; 420 420 421 421 moxie-*-elf | moxie-*-rtems* | moxie-*-uclinux) 422 targ_defvec=bfd_elf32_moxie_vec 422 targ_defvec=bfd_elf32_bigmoxie_vec 423 targ_selvecs=bfd_elf32_littlemoxie_vec 423 424 ;; 424 425 425 426 h8300*-*-rtemscoff*) -
.23.2/bfd/configure
diff -ru binutils-2.23.2/bfd/configure a_binutils-2.23.2/bfd/configure
old new 15212 15212 bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; 15213 15213 bfd_elf32_bigmips_vxworks_vec) 15214 15214 tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; 15215 bfd_elf32_bigmoxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;; 15215 15216 bfd_elf32_cr16_vec) tb="$tb elf32-cr16.lo elf32.lo $elf" ;; 15216 15217 bfd_elf32_cr16c_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;; 15217 15218 bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; … … 15223 15224 bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; 15224 15225 bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; 15225 15226 bfd_elf32_frvfdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; 15226 bfd_elf32_moxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;15227 15227 bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;; 15228 15228 bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; 15229 15229 bfd_elf32_hppa_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; … … 15254 15254 bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; 15255 15255 bfd_elf32_littlemips_vxworks_vec) 15256 15256 tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; 15257 bfd_elf32_littlemoxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;; 15257 15258 bfd_elf32_m32c_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;; 15258 15259 bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; 15259 15260 bfd_elf32_m32rle_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; -
.23.2/bfd/configure.in
diff -ru binutils-2.23.2/bfd/configure.in a_binutils-2.23.2/bfd/configure.in
old new 704 704 bfd_elf32_bigmips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; 705 705 bfd_elf32_bigmips_vxworks_vec) 706 706 tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; 707 bfd_elf32_bigmoxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;; 707 708 bfd_elf32_cr16_vec) tb="$tb elf32-cr16.lo elf32.lo $elf" ;; 708 709 bfd_elf32_cr16c_vec) tb="$tb elf32-cr16c.lo elf32.lo $elf" ;; 709 710 bfd_elf32_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;; … … 715 716 bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;; 716 717 bfd_elf32_frv_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; 717 718 bfd_elf32_frvfdpic_vec) tb="$tb elf32-frv.lo elf32.lo $elf" ;; 718 bfd_elf32_moxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;;719 719 bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;; 720 720 bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; 721 721 bfd_elf32_hppa_nbsd_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;; … … 746 746 bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; 747 747 bfd_elf32_littlemips_vxworks_vec) 748 748 tb="$tb elf32-mips.lo elfxx-mips.lo elf-vxworks.lo elf32.lo $elf ecofflink.lo" ;; 749 bfd_elf32_littlemoxie_vec) tb="$tb elf32-moxie.lo elf32.lo $elf" ;; 749 750 bfd_elf32_m32c_vec) tb="$tb elf32-m32c.lo elf32.lo $elf" ;; 750 751 bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; 751 752 bfd_elf32_m32rle_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;; -
.23.2/bfd/elf32-moxie.c
Only in a_binutils-2.23.2/bfd: configure.orig diff -ru binutils-2.23.2/bfd/elf32-moxie.c a_binutils-2.23.2/bfd/elf32-moxie.c
old new 366 366 #define ELF_MACHINE_CODE EM_MOXIE 367 367 #define ELF_MAXPAGESIZE 0x1 368 368 369 #define TARGET_BIG_SYM bfd_elf32_moxie_vec 370 #define TARGET_BIG_NAME "elf32-moxie" 369 #define TARGET_BIG_SYM bfd_elf32_bigmoxie_vec 370 #define TARGET_BIG_NAME "elf32-bigmoxie" 371 #define TARGET_LITTLE_SYM bfd_elf32_littlemoxie_vec 372 #define TARGET_LITTLE_NAME "elf32-littlemoxie" 371 373 372 374 #define elf_info_to_howto_rel NULL 373 375 #define elf_info_to_howto moxie_info_to_howto_rela -
.23.2/bfd/targets.c
diff -ru binutils-2.23.2/bfd/targets.c a_binutils-2.23.2/bfd/targets.c
old new 606 606 extern const bfd_target bfd_elf32_bigarm_vxworks_vec; 607 607 extern const bfd_target bfd_elf32_bigmips_vec; 608 608 extern const bfd_target bfd_elf32_bigmips_vxworks_vec; 609 extern const bfd_target bfd_elf32_bigmoxie_vec; 609 610 extern const bfd_target bfd_elf32_cr16_vec; 610 611 extern const bfd_target bfd_elf32_cr16c_vec; 611 612 extern const bfd_target bfd_elf32_cris_vec; … … 617 618 extern const bfd_target bfd_elf32_fr30_vec; 618 619 extern const bfd_target bfd_elf32_frv_vec; 619 620 extern const bfd_target bfd_elf32_frvfdpic_vec; 620 extern const bfd_target bfd_elf32_moxie_vec;621 621 extern const bfd_target bfd_elf32_h8300_vec; 622 622 extern const bfd_target bfd_elf32_hppa_linux_vec; 623 623 extern const bfd_target bfd_elf32_hppa_nbsd_vec; … … 645 645 extern const bfd_target bfd_elf32_littlearm_vxworks_vec; 646 646 extern const bfd_target bfd_elf32_littlemips_vec; 647 647 extern const bfd_target bfd_elf32_littlemips_vxworks_vec; 648 extern const bfd_target bfd_elf32_littlemoxie_vec; 648 649 extern const bfd_target bfd_elf32_m32c_vec; 649 650 extern const bfd_target bfd_elf32_m32r_vec; 650 651 extern const bfd_target bfd_elf32_m32rle_vec; … … 979 980 &bfd_elf32_bigarm_vxworks_vec, 980 981 &bfd_elf32_bigmips_vec, 981 982 &bfd_elf32_bigmips_vxworks_vec, 983 &bfd_elf32_bigmoxie_vec, 982 984 &bfd_elf32_cr16_vec, 983 985 &bfd_elf32_cr16c_vec, 984 986 &bfd_elf32_cris_vec, … … 990 992 &bfd_elf32_fr30_vec, 991 993 &bfd_elf32_frv_vec, 992 994 &bfd_elf32_frvfdpic_vec, 993 &bfd_elf32_moxie_vec,994 995 &bfd_elf32_h8300_vec, 995 996 &bfd_elf32_hppa_linux_vec, 996 997 &bfd_elf32_hppa_nbsd_vec, … … 1020 1021 &bfd_elf32_littlearm_vxworks_vec, 1021 1022 &bfd_elf32_littlemips_vec, 1022 1023 &bfd_elf32_littlemips_vxworks_vec, 1024 &bfd_elf32_littlemoxie_vec, 1023 1025 &bfd_elf32_m32c_vec, 1024 1026 &bfd_elf32_m32r_vec, 1025 1027 &bfd_elf32_m32rle_vec, -
.23.2/gas/config/tc-moxie.c
Only in a_binutils-2.23.2/gas: ChangeLog.orig Only in a_binutils-2.23.2/gas: ChangeLog.rej diff -ru binutils-2.23.2/gas/config/tc-moxie.c a_binutils-2.23.2/gas/config/tc-moxie.c
old new 1 1 /* tc-moxie.c -- Assemble code for moxie 2 Copyright 2009 2 Copyright 2009, 2012 3 3 Free Software Foundation, Inc. 4 4 5 5 This file is part of GAS, the GNU Assembler. … … 43 43 const char FLT_CHARS[] = "rRsSfFdDxXpP"; 44 44 const char EXP_CHARS[] = "eE"; 45 45 46 static int md_chars_to_number (char *val, int n); 46 static valueT md_chars_to_number (char * buf, int n); 47 48 /* Byte order. */ 49 extern int target_big_endian; 50 const char *moxie_target_format = DEFAULT_TARGET_FORMAT; 47 51 48 52 void 49 53 md_operand (expressionS *op __attribute__((unused))) … … 203 207 op_end++; 204 208 op_end = parse_exp_save_ilp (op_end, &arg); 205 209 fix_new_exp (frag_now, 206 ((p +1) - frag_now->fr_literal),210 ((p + (target_big_endian ? 1 : 0)) - frag_now->fr_literal), 207 211 1, 208 212 &arg, 209 213 0, … … 589 593 590 594 return NULL; 591 595 } 592 593 596 594 const char *md_shortopts = ""; 597 598 enum options 599 { 600 OPTION_EB = OPTION_MD_BASE, 601 OPTION_EL, 602 }; 595 603 596 604 struct option md_longopts[] = 597 605 { 598 {NULL, no_argument, NULL, 0} 606 { "EB", no_argument, NULL, OPTION_EB}, 607 { "EL", no_argument, NULL, OPTION_EL}, 608 { NULL, no_argument, NULL, 0} 599 609 }; 610 600 611 size_t md_longopts_size = sizeof (md_longopts); 612 601 613 614 const char *md_shortopts = ""; 602 615 603 /* We have no target specific options yet, so these next604 two functions are empty. */605 616 int 606 617 md_parse_option (int c ATTRIBUTE_UNUSED, char *arg ATTRIBUTE_UNUSED) 607 618 { 608 return 0; 619 switch (c) 620 { 621 case OPTION_EB: 622 target_big_endian = 1; 623 moxie_target_format = "elf32-bigmoxie"; 624 break; 625 case OPTION_EL: 626 target_big_endian = 0; 627 moxie_target_format = "elf32-littlemoxie"; 628 break; 629 default: 630 return 0; 631 } 632 633 return 1; 609 634 } 610 635 611 636 void 612 637 md_show_usage (FILE *stream ATTRIBUTE_UNUSED) 613 638 { 639 fprintf (stream, _("\ 640 -EB assemble for a big endian system (default)\n\ 641 -EL assemble for a little endian system\n")); 614 642 } -
.23.2/gas/config/tc-moxie.h
/* Apply a fixup to the object file. */ @@ -626,15 +654,35 @@ switch (fixP->fx_r_type) { case BFD_RELOC_32: - *buf++ = val >> 24; - *buf++ = val >> 16; - *buf++ = val >> 8; - *buf++ = val >> 0; + if (target_big_endian) + { + buf[0] = val >> 24; + buf[1] = val >> 16; + buf[2] = val >> 8; + buf[3] = val >> 0; + } + else + { + buf[3] = val >> 24; + buf[2] = val >> 16; + buf[1] = val >> 8; + buf[0] = val >> 0; + } + buf += 4; break; case BFD_RELOC_16: - *buf++ = val >> 8; - *buf++ = val >> 0; + if (target_big_endian) + { + buf[0] = val >> 8; + buf[1] = val >> 0; + } + else + { + buf[1] = val >> 8; + buf[0] = val >> 0; + } + buf += 2; break; case BFD_RELOC_8: @@ -665,28 +713,43 @@ fixP->fx_done = 1; } -/* Put number into target byte order (big endian). */ +/* Put number into target byte order. */ void -md_number_to_chars (char *ptr, valueT use, int nbytes) +md_number_to_chars (char * ptr, valueT use, int nbytes) { - number_to_chars_bigendian (ptr, use, nbytes); + if (target_big_endian) + number_to_chars_bigendian (ptr, use, nbytes); + else + number_to_chars_littleendian (ptr, use, nbytes); } /* Convert from target byte order to host byte order. */ -static int -md_chars_to_number (char *val, int n) +static valueT +md_chars_to_number (char * buf, int n) { - int retval = 0; + valueT result = 0; + unsigned char * where = (unsigned char *) buf; - while (n--) + if (target_big_endian) { - retval <<= 8; - retval |= (*val++ & 255); + while (n--) + { + result <<= 8; + result |= (*where++ & 255); + } + } + else + { + while (n--) + { + result <<= 8; + result |= (where[n] & 255); + } } - return retval; + return result; } /* Generate a machine-dependent relocation. */ @@ -774,7 +837,8 @@ case BFD_RELOC_32: return addr + 4; case BFD_RELOC_MOXIE_10_PCREL: - return addr; + /* Offset is from the end of the instruction. */ + return addr + 2; default: abort (); return addr; Only in a_binutils-2.23.2/gas/config: tc-moxie.c.orig diff -ru binutils-2.23.2/gas/config/tc-moxie.h a_binutils-2.23.2/gas/config/tc-moxie.h
old new 1 1 /* tc-moxie.h -- Header file for tc-moxie.c. 2 2 3 Copyright 2009 Free Software Foundation, Inc.3 Copyright 2009, 2012 Free Software Foundation, Inc. 4 4 5 5 This file is part of GAS, the GNU Assembler. 6 6 … … 22 22 #define TARGET_BYTES_BIG_ENDIAN 1 23 23 #define WORKING_DOT_WORD 24 24 25 /* This macro is the BFD target name to use when creating the output26 file. This will normally depend upon the `OBJ_FMT' macro. */27 #define TARGET_FORMAT "elf32-moxie"28 29 25 /* This macro is the BFD architecture to pass to `bfd_set_arch_mach'. */ 26 const char *moxie_target_format; 27 #define DEFAULT_TARGET_FORMAT "elf32-bigmoxie" 28 #define TARGET_FORMAT moxie_target_format 29 30 30 #define TARGET_ARCH bfd_arch_moxie 31 31 32 32 #define md_undefined_symbol(NAME) 0 -
.23.2/ld/emulparams/elf32moxie.sh
Only in a_binutils-2.23.2/ld: ChangeLog.orig Only in a_binutils-2.23.2/ld: ChangeLog.rej diff -ru binutils-2.23.2/ld/emulparams/elf32moxie.sh a_binutils-2.23.2/ld/emulparams/elf32moxie.sh
old new 1 1 SCRIPT_NAME=elf 2 2 TEMPLATE_NAME=generic 3 3 EXTRA_EM_FILE=genelf 4 OUTPUT_FORMAT="elf32-moxie" 4 OUTPUT_FORMAT="elf32-bigmoxie" 5 BIG_OUTPUT_FORMAT="elf32-bigmoxie" 6 LITTLE_OUTPUT_FORMAT="elf32-littlemoxie" 5 7 TEXT_START_ADDR=0x1000 6 8 MAXPAGESIZE="CONSTANT (MAXPAGESIZE)" 7 9 ARCH=moxie 10 EMBEDDED=yes 8 11 STACK_ADDR=0x400000 -
.23.2/opcodes/moxie-dis.c
Only in a_binutils-2.23.2/opcodes: ChangeLog.orig Only in a_binutils-2.23.2/opcodes: ChangeLog.rej diff -ru binutils-2.23.2/opcodes/moxie-dis.c a_binutils-2.23.2/opcodes/moxie-dis.c
old new 53 53 54 54 if ((status = info->read_memory_func (addr, buffer, 2, info))) 55 55 goto fail; 56 iword = bfd_getb16 (buffer); 56 57 if (info->endian == BFD_ENDIAN_BIG) 58 iword = bfd_getb16 (buffer); 59 else 60 iword = bfd_getl16 (buffer); 57 61 58 62 /* Form 1 instructions have the high bit set to 0. */ 59 63 if ((iword & (1<<15)) == 0) … … 79 83 unsigned imm; 80 84 if ((status = info->read_memory_func (addr + 2, buffer, 4, info))) 81 85 goto fail; 82 imm = bfd_getb32 (buffer); 86 if (info->endian == BFD_ENDIAN_BIG) 87 imm = bfd_getb32 (buffer); 88 else 89 imm = bfd_getl32 (buffer); 83 90 fpr (stream, "%s\t%s, 0x%x", opcode->name, 84 91 reg_names[OP_A(iword)], imm); 85 92 length = 6; … … 90 97 unsigned imm; 91 98 if ((status = info->read_memory_func (addr + 2, buffer, 4, info))) 92 99 goto fail; 93 imm = bfd_getb32 (buffer); 100 if (info->endian == BFD_ENDIAN_BIG) 101 imm = bfd_getb32 (buffer); 102 else 103 imm = bfd_getl32 (buffer); 94 104 fpr (stream, "%s\t0x%x", opcode->name, imm); 95 105 length = 6; 96 106 } … … 100 110 unsigned imm; 101 111 if ((status = info->read_memory_func (addr + 2, buffer, 4, info))) 102 112 goto fail; 103 imm = bfd_getb32 (buffer); 113 if (info->endian == BFD_ENDIAN_BIG) 114 imm = bfd_getb32 (buffer); 115 else 116 imm = bfd_getl32 (buffer); 104 117 fpr (stream, "%s\t", opcode->name); 105 118 info->print_address_func ((bfd_vma) imm, info); 106 119 length = 6; … … 119 132 unsigned imm; 120 133 if ((status = info->read_memory_func (addr + 2, buffer, 4, info))) 121 134 goto fail; 122 imm = bfd_getb32 (buffer); 135 if (info->endian == BFD_ENDIAN_BIG) 136 imm = bfd_getb32 (buffer); 137 else 138 imm = bfd_getl32 (buffer); 123 139 fpr (stream, "%s\t0x%x, %s", 124 140 opcode->name, imm, reg_names[OP_A(iword)]); 125 141 length = 6; … … 130 146 unsigned imm; 131 147 if ((status = info->read_memory_func (addr+2, buffer, 4, info))) 132 148 goto fail; 133 imm = bfd_getb32 (buffer); 149 if (info->endian == BFD_ENDIAN_BIG) 150 imm = bfd_getb32 (buffer); 151 else 152 imm = bfd_getl32 (buffer); 134 153 fpr (stream, "%s\t0x%x(%s), %s", opcode->name, 135 154 imm, 136 155 reg_names[OP_A(iword)], … … 143 162 unsigned imm; 144 163 if ((status = info->read_memory_func (addr+2, buffer, 4, info))) 145 164 goto fail; 146 imm = bfd_getb32 (buffer); 165 if (info->endian == BFD_ENDIAN_BIG) 166 imm = bfd_getb32 (buffer); 167 else 168 imm = bfd_getl32 (buffer); 147 169 fpr (stream, "%s\t%s, 0x%x(%s)", 148 170 opcode->name, 149 171 reg_names[OP_A(iword)], … … 183 205 { 184 206 case MOXIE_F3_PCREL: 185 207 fpr (stream, "%s\t", opcode->name); 186 info->print_address_func ((bfd_vma) (addr + INST2OFFSET(iword) ),208 info->print_address_func ((bfd_vma) (addr + INST2OFFSET(iword) + 2), 187 209 info); 188 210 break; 189 211 default:
Note: See TracBrowser
for help on using the repository browser.