* config/obj-coff.c: Don't use "bfd/" when including libbfd.h
authorStan Shebs <shebs@codesourcery.com>
Fri, 16 Jun 1995 00:07:45 +0000 (00:07 +0000)
committerStan Shebs <shebs@codesourcery.com>
Fri, 16 Jun 1995 00:07:45 +0000 (00:07 +0000)
and libcoff.h.
(fill_section): Call PROGRESS.
* Makefile.in (INCLUDES): Add bfd srcdir.

* mpw-config.in: Add bfd_gas flag and set for each config.
(i386-unknown-go32, m68k-unknown-coff): Recognize.
* mpw-make.in (HACK_O_RAMA, OBJ_COFF_OMIT_TIMESTAMP): Add to
config.h.

gas/ChangeLog
gas/config/obj-coff.c
gas/mpw-config.in
gas/mpw-make.in

index 3f48191..8a74c24 100644 (file)
@@ -1,3 +1,15 @@
+Thu Jun 15 16:53:37 1995  Stan Shebs  <shebs@andros.cygnus.com>
+
+       * config/obj-coff.c: Don't use "bfd/" when including libbfd.h
+       and libcoff.h.
+       (fill_section): Call PROGRESS.
+       * Makefile.in (INCLUDES): Add bfd srcdir.
+
+       * mpw-config.in: Add bfd_gas flag and set for each config.
+       (i386-unknown-go32, m68k-unknown-coff): Recognize.
+       * mpw-make.in (HACK_O_RAMA, OBJ_COFF_OMIT_TIMESTAMP): Add to
+       config.h.
+
 Thu Jun 15 10:04:26 1995  Doug Evans  <dje@canuck.cygnus.com>
 
        * config/tc-arm.h (LOCAL_LABEL): Prepend '.' if not OBJ_AOUT.
index 1c9f9cd..82b5e96 100644 (file)
@@ -1306,8 +1306,9 @@ symbol_dump ()
 #include "frags.h"
 /* This is needed because we include internal bfd things. */
 #include <time.h>
-#include "bfd/libbfd.h"
-#include "bfd/libcoff.h"
+
+#include "libbfd.h"
+#include "libcoff.h"
 
 /* The NOP_OPCODE is for the alignment fill value.  Fill with nop so
    that we can stick sections together without causing trouble.  */
@@ -1681,9 +1682,10 @@ fill_section (abfd, h, file_cursor)
   for (i = SEG_E0; i < SEG_UNKNOWN; i++)
     {
       unsigned int offset = 0;
-
       struct internal_scnhdr *s = &(segment_info[i].scnhdr);
 
+      PROGRESS (1);
+
       if (s->s_name[0])
        {
          fragS *frag = segment_info[i].frchainP->frch_root;
@@ -2949,13 +2951,11 @@ write_object_file ()
 
   H_SET_STRING_SIZE (&headers, string_byte_count);
 
-#if !defined(TC_H8300) && !defined(TC_Z8K)
   for (i = SEG_E0; i < SEG_UNKNOWN; i++)
     {
       fixup_mdeps (segment_info[i].frchainP->frch_root, &headers, i);
       fixup_segment (&segment_info[i], i);
     }
-#endif
 
   /* Look for ".stab" segments and fill in their initial symbols
      correctly. */
@@ -3489,6 +3489,9 @@ fixup_segment (segP, this_segment_type)
   register fragS *fragP;
   register segT add_symbol_segment = absolute_section;
 
+  if (linkrelax)
+    return;
+
   for (fixP = segP->fix_root; fixP; fixP = fixP->fx_next)
     {
       fragP = fixP->fx_frag;
@@ -3644,7 +3647,8 @@ fixup_segment (segP, this_segment_type)
                  break;
                default:
 
-#ifdef TC_A29K
+
+#if defined(TC_A29K) || (defined(TE_PE) && defined(TC_I386))
                  /* This really should be handled in the linker, but
                     backward compatibility forbids.  */
                  add_number += S_GET_VALUE (add_symbolP);
@@ -3687,7 +3691,7 @@ fixup_segment (segP, this_segment_type)
 
       if (pcrel)
        {
-#ifndef TC_M88K
+#if !defined(TC_M88K) && !(defined(TE_PE) && defined(TC_I386))
          /* This adjustment is not correct on the m88k, for which the
             linker does all the computation.  */
          add_number -= md_pcrel_from (fixP);
index 4005dc3..320daac 100644 (file)
@@ -6,16 +6,27 @@ Set target_arch `echo {target_canonical} | sed -e 's/-.*-.*//'`
 
 Set obj_format `echo {target_canonical} | sed -e 's/.*-.*-//'`
 
+Set bfd_gas no
+
 Set TDEFINES ""
 
 If "{target_canonical}" =~ /m68k-apple-macos/
        Set obj_format "coff"
+       Set TDEFINES '-d M68KCOFF'
 Else If "{target_canonical}" =~ /ppc-apple-macos/
        Set obj_format "xcoff"
-Else If "{target_canonical}" =~ /sh-hitachi-hms/
+       Set bfd_gas yes
+Else If "{target_canonical}" =~ /i386-unknown-go32/
        Set obj_format "coff"
+       Set TDEFINES '-d I386COFF'
+Else If "{target_canonical}" =~ /m68k-unknown-coff/
+       Set TDEFINES '-d M68KCOFF'
 Else If "{target_canonical}" =~ /mips-idt-ecoff/
+       Set bfd_gas yes
        Set TDEFINES '-d TARGET_BYTES_BIG_ENDIAN'
+Else If "{target_canonical}" =~ /sh-hitachi-hms/
+       Set obj_format "coff"
+       forward-include "{srcroot}"opcodes:sh-opc.h 'opcodes/sh-opc.h'
 End If
 
 forward-include "{srcdir}"config:tc-{target_arch}.c targ-cpu.c
@@ -44,6 +55,13 @@ End If
 Echo '# From mpw-config.in'      > "{o}"mk.tmp
 
 Echo 'VERSION = ' `Search 'VERSION=' "{srcdir}"Makefile.in | sed -e 's/.*VERSION=\(.*\)/\1/'` >> "{o}"mk.tmp
+
+If "{bfd_gas}" =~ /yes/
+       Echo "HACK_O_RAMA = BFD_ASSEMBLER" >> "{o}"mk.tmp
+Else
+       Echo "HACK_O_RAMA = MANY_SEGMENTS" >> "{o}"mk.tmp
+End If
+
 Echo "TDEFINES = " {TDEFINES}  >> "{o}"mk.tmp
 
 Echo '# End from mpw-config.in'        >> "{o}"mk.tmp
index 7dc5789..f7e9760 100644 (file)
@@ -103,11 +103,13 @@ as.new \Option-f\Option-f {OBJECTS} {TARG_OBJECTS} {CLIBS} "{o}"Version.r
        Echo '#define WANT_FOPEN_BIN'                   >> "{o}"config.new
        Echo '#define HAVE_ERRNO_H'                     >> "{o}"config.new
        Echo '#define HAVE_STDARG_H'                    >> "{o}"config.new
-       Echo '#define BFD_ASSEMBLER'                    >> "{o}"config.new
+       Echo '#define ' {HACK_O_RAMA}                   >> "{o}"config.new
+       Echo '#define OBJ_COFF_OMIT_TIMESTAMP'          >> "{o}"config.new
        Echo '#endif /* GAS_VERSION */'                 >> "{o}"config.new
        MoveIfChange "{o}"config.new "{o}"config.h
        Echo ' ' >"{o}"config-stamp
 
+
 "{o}"Version.r \Option-f "{o}"version-stamp
 
 "{o}"version-stamp \Option-f Makefile