/* Generic ECOFF swapping routines, for BFD.
- Copyright 1992, 1993, 1994, 1995, 1996, 2000 Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
struct fdr_ext ext[1];
*ext = *(struct fdr_ext *) ext_copy;
-
+
intern->adr = ecoff_get_off (abfd, (bfd_byte *)ext->f_adr);
intern->rss = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_rss);
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
- if (intern->rss == 0xffffffff)
+ if (intern->rss == (signed long) 0xffffffff)
intern->rss = -1;
#endif
intern->issBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_issBase);
intern->rfdBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_rfdBase);
intern->crfd = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_crfd);
- /* now the fun stuff... */
+ /* now the fun stuff... */
if (bfd_header_big_endian (abfd)) {
intern->lang = (ext->f_bits1[0] & FDR_BITS1_LANG_BIG)
>> FDR_BITS1_LANG_SH_BIG;
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
FDR intern[1];
*intern = *intern_copy; /* Make it reasonable to do in-place. */
-
+
ecoff_put_off (abfd, intern->adr, (bfd_byte *)ext->f_adr);
bfd_h_put_32 (abfd, intern->rss, (bfd_byte *)ext->f_rss);
bfd_h_put_32 (abfd, intern->issBase, (bfd_byte *)ext->f_issBase);
bfd_h_put_32 (abfd, intern->rfdBase, (bfd_byte *)ext->f_rfdBase);
bfd_h_put_32 (abfd, intern->crfd, (bfd_byte *)ext->f_crfd);
- /* now the fun stuff... */
+ /* now the fun stuff... */
if (bfd_header_big_endian (abfd)) {
ext->f_bits1[0] = (((intern->lang << FDR_BITS1_LANG_SH_BIG)
& FDR_BITS1_LANG_BIG)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
<< PDR_BITS2_RESERVED_SH_LEFT_LITTLE));
}
intern->localoff = bfd_h_get_8 (abfd, (bfd_byte *) ext->p_localoff);
-#endif
+#endif
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
PDR intern[1];
*intern = *intern_copy; /* Make it reasonable to do in-place. */
-
+
ecoff_put_off (abfd, intern->adr, (bfd_byte *)ext->p_adr);
bfd_h_put_32 (abfd, intern->isym, (bfd_byte *)ext->p_isym);
bfd_h_put_32 (abfd, intern->iline, (bfd_byte *)ext->p_iline);
& PDR_BITS2_RESERVED_LITTLE);
}
bfd_h_put_8 (abfd, intern->localoff, (bfd_byte *) ext->p_localoff);
-#endif
+#endif
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
#else /* MPW_C */
/* Same routines, but with ECOFF_64 code removed, so ^&%$#&! MPW C doesn't
- corrupt itself and then freak out. */
+ corrupt itself and then freak out. */
/* Swap in the procedure descriptor record. */
static void
struct pdr_ext ext[1];
*ext = *(struct pdr_ext *) ext_copy;
-
+
intern->adr = ecoff_get_off (abfd, (bfd_byte *)ext->p_adr);
intern->isym = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_isym);
intern->iline = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_iline);
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
PDR intern[1];
*intern = *intern_copy; /* Make it reasonable to do in-place. */
-
+
ecoff_put_off (abfd, intern->adr, (bfd_byte *)ext->p_adr);
bfd_h_put_32 (abfd, intern->isym, (bfd_byte *)ext->p_isym);
bfd_h_put_32 (abfd, intern->iline, (bfd_byte *)ext->p_iline);
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
#endif /* MPW_C */
struct sym_ext ext[1];
*ext = *(struct sym_ext *) ext_copy;
-
+
intern->iss = bfd_h_get_32 (abfd, (bfd_byte *)ext->s_iss);
intern->value = ecoff_get_off (abfd, (bfd_byte *)ext->s_value);
- /* now the fun stuff... */
+ /* now the fun stuff... */
if (bfd_header_big_endian (abfd)) {
intern->st = (ext->s_bits1[0] & SYM_BITS1_ST_BIG)
>> SYM_BITS1_ST_SH_BIG;
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
SYMR intern[1];
*intern = *intern_copy; /* Make it reasonable to do in-place. */
-
+
bfd_h_put_32 (abfd, intern->iss, (bfd_byte *)ext->s_iss);
ecoff_put_off (abfd, intern->value, (bfd_byte *)ext->s_value);
- /* now the fun stuff... */
+ /* now the fun stuff... */
if (bfd_header_big_endian (abfd)) {
ext->s_bits1[0] = (((intern->st << SYM_BITS1_ST_SH_BIG)
& SYM_BITS1_ST_BIG)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
struct ext_ext ext[1];
*ext = *(struct ext_ext *) ext_copy;
-
- /* now the fun stuff... */
+
+ /* now the fun stuff... */
if (bfd_header_big_endian (abfd)) {
intern->jmptbl = 0 != (ext->es_bits1[0] & EXT_BITS1_JMPTBL_BIG);
intern->cobol_main = 0 != (ext->es_bits1[0] & EXT_BITS1_COBOL_MAIN_BIG);
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
EXTR intern[1];
*intern = *intern_copy; /* Make it reasonable to do in-place. */
-
- /* now the fun stuff... */
+
+ /* now the fun stuff... */
if (bfd_header_big_endian (abfd)) {
ext->es_bits1[0] = ((intern->jmptbl ? EXT_BITS1_JMPTBL_BIG : 0)
| (intern->cobol_main ? EXT_BITS1_COBOL_MAIN_BIG : 0)
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
- abort();
+ abort ();
#endif
}