public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* remove GNU960 conditional code in bfd
@ 2005-02-24 14:45 Ben Elliston
  2005-02-24 17:32 ` Nick Clifton
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Elliston @ 2005-02-24 14:45 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 3293 bytes --]

Likewise for bfd.  Okay for mainline?

2005-02-24  Ben Elliston  <bje@au.ibm.com>

         * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
         * format.c (bfd_check_format_matches): Likewise.
         * archive.c (BFD_GNU960_ARMAG): Likewise.
         (bfd_generic_archive_p): Likewise.
         (_bfd_write_archive_contents): Likewise.

Index: coffcode.h
===================================================================
RCS file: /home/bje/src-cvs/src/bfd/coffcode.h,v
retrieving revision 1.118
diff -u -p -r1.118 coffcode.h
--- coffcode.h	22 Feb 2005 00:50:04 -0000	1.118
+++ coffcode.h	24 Feb 2005 05:38:59 -0000
@@ -5128,15 +5128,6 @@ coff_canonicalize_reloc (abfd, section,
    return section->reloc_count;
  }

-#ifdef GNU960
-file_ptr
-coff_sym_filepos (abfd)
-     bfd *abfd;
-{
-  return obj_sym_filepos (abfd);
-}
-#endif
-
  #ifndef coff_reloc16_estimate
  #define coff_reloc16_estimate dummy_reloc16_estimate

Index: format.c
===================================================================
RCS file: /home/bje/src-cvs/src/bfd/format.c,v
retrieving revision 1.16
diff -u -p -r1.16 format.c
--- format.c	30 Nov 2003 18:40:41 -0000	1.16
+++ format.c	24 Feb 2005 05:38:59 -0000
@@ -245,16 +245,6 @@ bfd_check_format_matches (bfd *abfd, bfd
  	    matching_vector[match_count] = temp;

  	  match_count++;
-
-#ifdef GNU960
-	  /* Big- and little-endian b.out archives look the same, but it
-	     doesn't matter: there is no difference in their headers, and
-	     member file byte orders will (I hope) be handled appropriately
-	     by bfd.  Ditto for big and little coff archives.  And the 4
-	     coff/b.out object formats are unambiguous.  So accept the
-	     first match we find.  */
-	  break;
-#endif
  	}
        else if ((err = bfd_get_error ()) == bfd_error_wrong_object_format
  	       || err == bfd_error_file_ambiguously_recognized)
Index: archive.c
===================================================================
RCS file: /home/bje/src-cvs/src/bfd/archive.c,v
retrieving revision 1.32
diff -u -p -r1.32 archive.c
--- archive.c	31 Jan 2005 23:13:14 -0000	1.32
+++ archive.c	24 Feb 2005 05:38:59 -0000
@@ -133,15 +133,12 @@ DESCRIPTION
  #include "aout/ar.h"
  #include "aout/ranlib.h"
  #include "safe-ctype.h"

  #ifndef errno
  extern int errno;
  #endif

-#ifdef GNU960
-#define BFD_GNU960_ARMAG(abfd)	(BFD_COFF_FILE_P((abfd)) ? ARMAG : ARMAGB)
-#endif
-
  /* We keep a cache of archive filepointers to archive elements to
     speed up searching the archive by filepos.  We only add an entry to
     the cache when we actually read one.  We also don't sort the cache;
@@ -581,14 +598,9 @@ bfd_generic_archive_p (bfd *abfd)
        return NULL;
      }

-#ifdef GNU960
-  if (strncmp (armag, BFD_GNU960_ARMAG (abfd), SARMAG) != 0)
-    return 0;
-#else
    if (strncmp (armag, ARMAG, SARMAG) != 0 &&
        strncmp (armag, ARMAGB, SARMAG) != 0)
      return 0;
-#endif

    tdata_hold = bfd_ardata (abfd);

@@ -1652,11 +1664,7 @@ _bfd_write_archive_contents (bfd *arch)

    if (bfd_seek (arch, (file_ptr) 0, SEEK_SET) != 0)
      return FALSE;
-#ifdef GNU960
-  wrote = bfd_bwrite (BFD_GNU960_ARMAG (arch), SARMAG, arch);
-#else
    wrote = bfd_bwrite (ARMAG, SARMAG, arch);
-#endif
    if (wrote != SARMAG)
      return FALSE;


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 256 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: remove GNU960 conditional code in bfd
  2005-02-24 14:45 remove GNU960 conditional code in bfd Ben Elliston
@ 2005-02-24 17:32 ` Nick Clifton
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2005-02-24 17:32 UTC (permalink / raw)
  To: Ben Elliston; +Cc: binutils

Hi Ben,

> 2005-02-24  Ben Elliston  <bje@au.ibm.com>
> 
>         * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
>         * format.c (bfd_check_format_matches): Likewise.
>         * archive.c (BFD_GNU960_ARMAG): Likewise.
>         (bfd_generic_archive_p): Likewise.
>         (_bfd_write_archive_contents): Likewise.

Approved - please apply.

Cheers
   Nick


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-02-24 16:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-24 14:45 remove GNU960 conditional code in bfd Ben Elliston
2005-02-24 17:32 ` Nick Clifton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).