Add moxiebox target
authorAnthony Green <green@moxielogic.com>
Sun, 27 Jul 2014 12:51:20 +0000 (08:51 -0400)
committerAnthony Green <green@moxielogic.com>
Sun, 27 Jul 2014 12:51:20 +0000 (08:51 -0400)
bfd/ChangeLog
bfd/config.bfd
gas/ChangeLog
gas/config/tc-moxie.c
gas/config/tc-moxie.h
gas/configure.tgt
ld/ChangeLog
ld/Makefile.am
ld/Makefile.in
ld/configure.tgt
ld/emulparams/moxiebox.sh [new file with mode: 0644]

index 1eb47c91d126a535c2b1eeb43cba1b9db04572a7..f18776175cea64f026ecb1d9e00c2fef3134b2cd 100644 (file)
@@ -1,3 +1,7 @@
+2014-07-27  Anthony Green  <green@moxielogic.org>
+
+       * config.bfd: Add moxie-*-moxiebox*.
+
 2014-07-21  Joel Sherrill  <joel.sherrill@oarcorp.com>
 
        Add or reactivate or1k-*-rtems*
index e082f1d5a0849f7c9ea1e4a29fb90ffa23022913..1950ca01c5f80fcfc5834dbcf07fff32c141753f 100644 (file)
@@ -446,6 +446,10 @@ case "${targ}" in
     targ_selvecs=moxie_elf32_le_vec
     ;;
 
+  moxie-*-moxiebox*)
+    targ_defvec=moxie_elf32_le_vec
+    ;;
+
   h8300*-*-rtemscoff*)
     targ_defvec=h8300_coff_vec
     targ_underscore=yes
index 1861e37a0156ec30ff4c4453b9e9b45b0e437d75..d094926f6b857e88dee417ef546a01998f0aa306 100644 (file)
@@ -1,3 +1,11 @@
+2014-07-27  Anthony Green  <green@moxielogic.com>
+
+       * configure.tgt (generic_target): Add moxie-*-moxiebox*
+       * config/tc-moxie.c: Remove moxie_target_format.
+       (md_begin): Set default target_big_endian.
+       * config/tc-moxie.h: Only set TARGET_BYTES_BIG_ENDIAN if unset.
+       (TARGET_FORMAT): Set based on target_big_endian.
+
 2014-07-26  Alan Modra  <amodra@gmail.com>
 
        * config/bfin-parse.y: Don't include obstack.h.
index 430a1449eb97f783a71108c5b7435883c6dff9b5..02a59b7c7089304340b2b129172d22734c81c62d 100644 (file)
@@ -46,7 +46,6 @@ static valueT md_chars_to_number (char * buf, int n);
 
 /* Byte order.  */
 extern int target_big_endian;
-const char *moxie_target_format = DEFAULT_TARGET_FORMAT;
 
 void
 md_operand (expressionS *op __attribute__((unused)))
@@ -75,6 +74,8 @@ md_begin (void)
   for (count = 0, opcode = moxie_form3_opc_info; count++ < 10; opcode++)
     hash_insert (opcode_hash_control, opcode->name, (char *) opcode);
 
+  target_big_endian = TARGET_BYTES_BIG_ENDIAN;
+
   bfd_set_arch_mach (stdoutput, TARGET_ARCH, 0);
 }
 
@@ -617,11 +618,9 @@ md_parse_option (int c ATTRIBUTE_UNUSED, char *arg ATTRIBUTE_UNUSED)
     {
     case OPTION_EB: 
       target_big_endian = 1; 
-      moxie_target_format = "elf32-bigmoxie";
       break;
     case OPTION_EL: 
       target_big_endian = 0;
-      moxie_target_format = "elf32-littlemoxie";
       break;
     default:        
       return 0;
index d5a24cd551b5d16aab9e25305ce678ad4659d3dc..ed4f273adbbe881344e52343f77a1d99cb677cc2 100644 (file)
    Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #define TC_MOXIE 1
+#ifndef TARGET_BYTES_BIG_ENDIAN
 #define TARGET_BYTES_BIG_ENDIAN 1
+#endif
 #define WORKING_DOT_WORD
 
 /* This macro is the BFD architecture to pass to `bfd_set_arch_mach'.  */
-const char *moxie_target_format;
-#define DEFAULT_TARGET_FORMAT  "elf32-bigmoxie"
-#define TARGET_FORMAT          moxie_target_format
+#define TARGET_FORMAT (target_big_endian ? "elf32-bigmoxie" : "elf32-littlemoxie")
 
 #define TARGET_ARCH bfd_arch_moxie
 
index 7ef0c06e93a9a49944abd43a843f6c6c2ae0da72..877f34d3e8136664ee8637220fd36fa83502ee70 100644 (file)
@@ -339,9 +339,10 @@ case ${generic_target} in
   mn10300-*-linux*)                    fmt=elf em=linux ;;
   mn10300-*-*)                         fmt=elf ;;
 
-  moxie-*-uclinux)                     fmt=elf em=linux;;
+  moxie-*-uclinux)                     fmt=elf em=linux ;;
+  moxie-*-moxiebox*)                    fmt=elf endian=little ;;
   moxie-*-*)                           fmt=elf ;;
-
+    
   mt-*-elf)                            fmt=elf bfd_gas=yes ;;
 
   msp430-*-*)                          fmt=elf ;;
index 9354e640ebaebeb437533bd8e5667b0370a4f636..e6ed34c9f82e47d279e17ea47282823aede1143b 100644 (file)
@@ -1,3 +1,11 @@
+2014-07-27  Anthony Green  <green@moxielogic.com>
+
+       * Makefile.am (ALL_EMULATION_SOURCES): Add moxiebox support.
+       (emoxiebox.c): Build.
+       * configure.tgt (targ_extra_ofiles): Add moxie-*-moxiebox*.
+       * emulparams/moxiebox.sh (TEXT_START_ADDR): New file.
+       * Makefile.in: Rebuilt.
+
 2014-07-17  Stefan Kristiansson  <stefan.kristiansson@saunalahti.fi>
 
        * emulparams/elf32or1k_linux.sh (TEXT_START_ADDR): Increase from
index 8e8ae202c8ad9c96b4ed1a9101477423ae7e2e69..9575f1f423223becb1347759ca5dc43115b4085d 100644 (file)
@@ -247,6 +247,7 @@ ALL_EMULATION_SOURCES = \
        eelf32microblazeel.c \
        eelf32microblaze.c \
        eelf32moxie.c \
+       emoxiebox.c \
        eelf32mt.c \
        eelf32or1k.c \
        eelf32or1k_linux.c \
@@ -1160,6 +1161,9 @@ eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh $(ELF_DEPS) \
 eelf32moxie.c: $(srcdir)/emulparams/elf32moxie.sh \
   $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
+emoxiebox.c: $(srcdir)/emulparams/moxiebox.sh \
+  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+
 eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \
   $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
index 971dc5f828939241e786a4d3c97e6423ba1b8543..f89eaf96adf11783abe9005b73940f514072ea7f 100644 (file)
@@ -555,6 +555,7 @@ ALL_EMULATION_SOURCES = \
        eelf32microblazeel.c \
        eelf32microblaze.c \
        eelf32moxie.c \
+       emoxiebox.c \
        eelf32mt.c \
        eelf32or1k.c \
        eelf32or1k_linux.c \
@@ -1173,6 +1174,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32microblazeel.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mipswindiss.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32moxie.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/emoxiebox.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32mt.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eelf32or1k_linux.Po@am__quote@
@@ -2600,6 +2602,9 @@ eelf32mipswindiss.c: $(srcdir)/emulparams/elf32mipswindiss.sh $(ELF_DEPS) \
 eelf32moxie.c: $(srcdir)/emulparams/elf32moxie.sh \
   $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
+emoxiebox.c: $(srcdir)/emulparams/moxiebox.sh \
+  $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+
 eelf32mt.c: $(srcdir)/emulparams/elf32mt.sh \
   $(ELF_GEN_DEPS) $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 
index e74e9be0799b62cd2c63ba93c329770b46d2acc4..33fb378a2f8afdbb2e9ff044bdd6ab783c72c785 100644 (file)
@@ -188,6 +188,8 @@ fr30-*-*)           targ_emul=elf32fr30
 frv-*-*linux*)         targ_emul=elf32frvfd ;;
 frv-*-*)               targ_emul=elf32frv ; targ_extra_emuls="elf32frvfd"
                        ;;
+moxie-*-moxiebox*)     targ_emul=moxiebox
+                       ;;
 moxie-*-*)             targ_emul=elf32moxie
                        ;;
 h8300-*-hms* | h8300-*-coff* | h8300-*-rtemscoff*)
diff --git a/ld/emulparams/moxiebox.sh b/ld/emulparams/moxiebox.sh
new file mode 100644 (file)
index 0000000..99b530a
--- /dev/null
@@ -0,0 +1,9 @@
+SCRIPT_NAME=elf
+TEMPLATE_NAME=generic
+EXTRA_EM_FILE=genelf
+OUTPUT_FORMAT="elf32-littlemoxie"
+TEXT_START_ADDR=0x1000
+MAXPAGESIZE="CONSTANT (MAXPAGESIZE)"
+ARCH=moxie
+EMBEDDED=yes
+STACK_ADDR=0x400000
This page took 0.030881 seconds and 4 git commands to generate.