OSDN Git Service

Updates for fixing tic4x arch tagging of its object files.
authorSvein Seldal <svein@dev.seldal.com>
Mon, 20 Jan 2003 22:34:39 +0000 (22:34 +0000)
committerSvein Seldal <svein@dev.seldal.com>
Mon, 20 Jan 2003 22:34:39 +0000 (22:34 +0000)
* bfd/coffcode.h (coff_set_flags): Added get/set arch hooks.
* include/coff/tic4x.h (TICOFF_TARGET_MACHINE_GET): Fixed define bug
* include/coff/ti.h (TICOFF_TARGET_MACHINE_GET): Added macros
* ld/Makefile.am: Added etic3xcoff.o and etic4xcoff_onchip.o
* ld/Makefile.in: Regenerate
* ld/configure.tgt: Added extra target emulations
* ld/emulparams/tic3xcoff.sh: Remove old settings
* ld/emulparams/tic4xcoff.sh: Ditto
* ld/emulparams/tic3xcoff-onchip.sh: Added new
* ld/scripttempl/tic4xcoff.sc: Revise and combine both c3x and c4x
* ld/scripttempl/tic3xcoff.sc: Remove

bfd/ChangeLog
bfd/coffcode.h
include/ChangeLog
include/coff/ti.h
include/coff/tic4x.h

index eb037e2..c50cee7 100644 (file)
@@ -1,3 +1,7 @@
+2003-01-20  Svein E. Seldal  <Svein.Seldal@solidas.com>
+
+       * coffcode.h (coff_set_flags): Added get/set arch hooks.
+       
 2003-01-20  Fabio Alemagna  <falemagn@aros.org>
 
        * elf32-sh.c: Treat elfNN_bed like other macros defined in
index 36ae1a9..7ce60db 100644 (file)
@@ -2128,6 +2128,7 @@ coff_set_arch_mach_hook (abfd, filehdr)
       /* this TI COFF section should be used by all new TI COFF v0 targets */
     case TICOFF0MAGIC:
       arch = TICOFF_TARGET_ARCH;
+      machine = TICOFF_TARGET_MACHINE_GET (internal_f->f_flags);
       break;
 #endif
 #endif
@@ -2142,6 +2143,7 @@ coff_set_arch_mach_hook (abfd, filehdr)
 #ifdef TI_TARGET_ID
         case TI_TARGET_ID:
           arch = TICOFF_TARGET_ARCH;
+         machine = TICOFF_TARGET_MACHINE_GET (internal_f->f_flags);
           break;
 #endif
         default:
@@ -2612,6 +2614,7 @@ coff_set_flags (abfd, magicp, flagsp)
               return FALSE;
             }
         }
+      TICOFF_TARGET_MACHINE_SET (flagsp, bfd_get_mach (abfd));
       return TRUE;
 #endif
 
index 771808c..79cf42d 100644 (file)
@@ -1,3 +1,8 @@
+2003-01-20  Svein E. Seldal  <Svein.Seldal@solidas.com>
+
+       * coff/tic4x.h (TICOFF_TARGET_MACHINE_GET): Fixed define bug
+       * coff/ti.h (TICOFF_TARGET_MACHINE_GET): Added macros
+
 2002-07-17  Geoffrey Keating  <geoffk@redhat.com>
 
        * splay-tree.h (GTY): Define if undefined.
index 0a59b22..8df1522 100644 (file)
@@ -57,6 +57,14 @@ struct external_filehdr
 #error "TICOFF_TARGET_ARCH needs to be defined for your CPU"
 #endif
 
+#ifndef TICOFF_TARGET_MACHINE_GET
+#define TICOFF_TARGET_MACHINE_GET(FLAGS) 0
+#endif
+
+#ifndef TICOFF_TARGET_MACHINE_SET
+#define TICOFF_TARGET_MACHINE_SET(FLAGSP, MACHINE)
+#endif
+
 /* Default to COFF2 for file output */
 #ifndef TICOFF_DEFAULT_MAGIC
 #define TICOFF_DEFAULT_MAGIC TICOFF2MAGIC
index 03215fb..083cc3b 100644 (file)
 /* We use COFF2.  */
 #define TICOFF_DEFAULT_MAGIC   TICOFF2MAGIC 
 
-#define TICOFF_TARGET_MACHINE_GET (FLAGS) \
+#define TICOFF_TARGET_MACHINE_GET(FLAGS) \
   (((FLAGS) & F_VERS) ? bfd_mach_c4x : bfd_mach_c3x)
 
-#define TICOFF_TARGET_MACHINE_SET (FLAGSP, MACHINE)    \
+#define TICOFF_TARGET_MACHINE_SET(FLAGSP, MACHINE)     \
   do                                                   \
     {                                                  \
       if ((MACHINE) == bfd_mach_c4x)                   \
-        *(FLAGSP) = F_VERS;                            \
+        *(FLAGSP) |= F_VERS;                           \
     }                                                  \
   while (0)