* aoutf1.h (sunos_set_arch_mach): Use bfd_mach_m68* rather than
authorIan Lance Taylor <ian@airs.com>
Wed, 25 Mar 1998 20:21:20 +0000 (20:21 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 25 Mar 1998 20:21:20 +0000 (20:21 +0000)
plain numbers.
(sunos_write_object_contents): Likewise.
* aoutx.h (NAME(aout,machine_type)): Likewise.
* coffcode.h (coff_set_arch_mach_hook): Likewise.

bfd/ChangeLog
bfd/coffcode.h

index fdd9ae666ae5baf89d30f35d712a66500e2d3dd3..4677203d02d8a32cb01c60120346771018f3bf47 100644 (file)
@@ -1,11 +1,19 @@
+Wed Mar 25 15:19:38 1998  Ian Lance Taylor  <ian@cygnus.com>
+
+       * aoutf1.h (sunos_set_arch_mach): Use bfd_mach_m68* rather than
+       plain numbers.
+       (sunos_write_object_contents): Likewise.
+       * aoutx.h (NAME(aout,machine_type)): Likewise.
+       * coffcode.h (coff_set_arch_mach_hook): Likewise.
+
 Wed Mar 25 13:59:24 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
 
        * archures.c (bfd_mach_m68*): Add definitions for various m68k
        variants.
        (bfd_default_scan): Remove m68k special cases.
        * bfd-in2.h: Rebuild.
-       * mipsbsd.c (MY(write_object_contents)): Use bfd_mach_m680*
-       instead of plain numbers.
+       * mipsbsd.c (MY(write_object_contents)): Use bfd_mach_m68* rather
+       than plain numbers.
        * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
        * cpu-m68k.c (arch_info_struct): Likewise.  Add entry for
        m68k:68000.
index fe89a1d4cd586385e38e4f6b5aacc8f9f5c9c644..753b662920338c5d0fbf4493d9191ec049026e40 100644 (file)
@@ -1,5 +1,6 @@
 /* Support for the generic parts of most COFF variants, for BFD.
-   Copyright 1990, 91, 92, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
+   Copyright 1990, 91, 92, 93, 94, 95, 96, 97, 1998
+   Free Software Foundation, Inc.
    Written by Cygnus Support.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -1405,7 +1406,7 @@ coff_set_arch_mach_hook (abfd, filehdr)
     case LYNXCOFFMAGIC:
 #endif
       arch = bfd_arch_m68k;
-      machine = 68020;
+      machine = bfd_mach_m68020;
       break;
 #endif
 #ifdef MC88MAGIC
@@ -2287,6 +2288,19 @@ coff_compute_section_file_positions (abfd)
        current != (asection *) NULL;
        current = current->next, ++count)
     {
+#ifdef COFF_IMAGE_WITH_PE
+      /* The NT loader does not want empty section headers, so we omit
+         them.  We don't actually remove the section from the BFD,
+         although we probably should.  This matches code in
+         coff_write_object_contents.  */
+      if (current->_raw_size == 0)
+       {
+         current->target_index = -1;
+         --count;
+         continue;
+       }
+#endif
+
       current->target_index = count;
 
       /* Only deal with sections which have contents */
@@ -3447,7 +3461,7 @@ coff_slurp_symbol_table (abfd)
 #endif
 
            case C_EXT:
-#ifdef ARM
+#if defined ARM || defined COFF_WITH_PE
             case C_THUMBEXT:
             case C_THUMBEXTFUNC:
 #endif
@@ -3520,7 +3534,7 @@ coff_slurp_symbol_table (abfd)
 #ifdef I960
            case C_LEAFSTAT:    /* static leaf procedure        */
 #endif
-#ifdef ARM
+#if defined ARM || defined COFF_WITH_PE
             case C_THUMBSTAT:   /* Thumb static                  */
             case C_THUMBLABEL:  /* Thumb label                   */
             case C_THUMBSTATFUNC:/* Thumb static function        */
@@ -3729,11 +3743,7 @@ coff_slurp_symbol_table (abfd)
 #endif
 
 #ifdef COFFARM
-#ifdef COFF_WITH_PE
-#define OTHER_GLOBAL_CLASS C_SECTION || syment->n_sclass == C_THUMBEXT
-#else
 #define OTHER_GLOBAL_CLASS C_THUMBEXT || syment->n_sclass == C_THUMBEXTFUNC
-#endif
 #else
 #ifdef COFF_WITH_PE
 #define OTHER_GLOBAL_CLASS C_SECTION