/[gcl]/gcl/binutils/bfd/ecoffswap.h
ViewVC logotype

Diff of /gcl/binutils/bfd/ecoffswap.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by camm, Fri Aug 9 05:35:05 2002 UTC revision 1.1.1.1.20.1 by camm, Fri Sep 30 02:08:56 2005 UTC
# Line 1  Line 1 
1  /* Generic ECOFF swapping routines, for BFD.  /* Generic ECOFF swapping routines, for BFD.
2     Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001     Copyright 1992, 1993, 1994, 1995, 1996, 2000, 2001, 2002, 2004
3     Free Software Foundation, Inc.     Free Software Foundation, Inc.
4     Written by Cygnus Support.     Written by Cygnus Support.
5    
6  This file is part of BFD, the Binary File Descriptor library.     This file is part of BFD, the Binary File Descriptor library.
7    
8  This program is free software; you can redistribute it and/or modify     This program is free software; you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by     it under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or     the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.     (at your option) any later version.
12    
13  This program is distributed in the hope that it will be useful,     This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of     but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  GNU General Public License for more details.     GNU General Public License for more details.
17    
18  You should have received a copy of the GNU General Public License     You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software     along with this program; if not, write to the Free Software
20  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
21    
22  /* NOTE: This is a header file, but it contains executable routines.  /* NOTE: This is a header file, but it contains executable routines.
23     This is done this way because these routines are substantially     This is done this way because these routines are substantially
# Line 220  ecoff_swap_fdr_in (abfd, ext_copy, inter Line 220  ecoff_swap_fdr_in (abfd, ext_copy, inter
220    intern->rfdBase       = H_GET_32 (abfd, ext->f_rfdBase);    intern->rfdBase       = H_GET_32 (abfd, ext->f_rfdBase);
221    intern->crfd          = H_GET_32 (abfd, ext->f_crfd);    intern->crfd          = H_GET_32 (abfd, ext->f_crfd);
222    
223    /* now the fun stuff...  */    /* Now the fun stuff...  */
224    if (bfd_header_big_endian (abfd))    if (bfd_header_big_endian (abfd))
225      {      {
226        intern->lang       = ((ext->f_bits1[0] & FDR_BITS1_LANG_BIG)        intern->lang       = ((ext->f_bits1[0] & FDR_BITS1_LANG_BIG)
# Line 263  ecoff_swap_fdr_out (abfd, intern_copy, e Line 263  ecoff_swap_fdr_out (abfd, intern_copy, e
263    struct fdr_ext *ext = (struct fdr_ext *) ext_ptr;    struct fdr_ext *ext = (struct fdr_ext *) ext_ptr;
264    FDR intern[1];    FDR intern[1];
265    
266    *intern = *intern_copy;       /* Make it reasonable to do in-place.  */    /* Make it reasonable to do in-place.  */
267      *intern = *intern_copy;
268    
269    ECOFF_PUT_OFF (abfd, intern->adr,       ext->f_adr);    ECOFF_PUT_OFF (abfd, intern->adr,       ext->f_adr);
270    H_PUT_32      (abfd, intern->rss,       ext->f_rss);    H_PUT_32      (abfd, intern->rss,       ext->f_rss);
# Line 288  ecoff_swap_fdr_out (abfd, intern_copy, e Line 289  ecoff_swap_fdr_out (abfd, intern_copy, e
289    H_PUT_32      (abfd, intern->rfdBase,   ext->f_rfdBase);    H_PUT_32      (abfd, intern->rfdBase,   ext->f_rfdBase);
290    H_PUT_32      (abfd, intern->crfd,      ext->f_crfd);    H_PUT_32      (abfd, intern->crfd,      ext->f_crfd);
291    
292    /* now the fun stuff...  */    /* Now the fun stuff...  */
293    if (bfd_header_big_endian (abfd))    if (bfd_header_big_endian (abfd))
294      {      {
295        ext->f_bits1[0] = (((intern->lang << FDR_BITS1_LANG_SH_BIG)        ext->f_bits1[0] = (((intern->lang << FDR_BITS1_LANG_SH_BIG)
# Line 323  ecoff_swap_fdr_out (abfd, intern_copy, e Line 324  ecoff_swap_fdr_out (abfd, intern_copy, e
324  #endif  #endif
325  }  }
326    
 #ifndef MPW_C  
   
327  /* Swap in the procedure descriptor record.  */  /* Swap in the procedure descriptor record.  */
328    
329  static void  static void
# Line 355  ecoff_swap_pdr_in (abfd, ext_copy, inter Line 354  ecoff_swap_pdr_in (abfd, ext_copy, inter
354    intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->p_cbLineOffset);    intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->p_cbLineOffset);
355    
356  #if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)  #if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
357      if (intern->isym == (signed long) 0xffffffff)
358        intern->isym = -1;
359      if (intern->iline == (signed long) 0xffffffff)
360        intern->iline = -1;
361    
362    intern->gp_prologue = H_GET_8 (abfd, ext->p_gp_prologue);    intern->gp_prologue = H_GET_8 (abfd, ext->p_gp_prologue);
363    if (bfd_header_big_endian (abfd))    if (bfd_header_big_endian (abfd))
364      {      {
# Line 396  ecoff_swap_pdr_out (abfd, intern_copy, e Line 400  ecoff_swap_pdr_out (abfd, intern_copy, e
400    struct pdr_ext *ext = (struct pdr_ext *) ext_ptr;    struct pdr_ext *ext = (struct pdr_ext *) ext_ptr;
401    PDR intern[1];    PDR intern[1];
402    
403    *intern = *intern_copy;       /* Make it reasonable to do in-place.  */    /* Make it reasonable to do in-place.  */
404      *intern = *intern_copy;
405    
406    ECOFF_PUT_OFF (abfd, intern->adr,          ext->p_adr);    ECOFF_PUT_OFF (abfd, intern->adr,          ext->p_adr);
407    H_PUT_32      (abfd, intern->isym,         ext->p_isym);    H_PUT_32      (abfd, intern->isym,         ext->p_isym);
# Line 447  ecoff_swap_pdr_out (abfd, intern_copy, e Line 452  ecoff_swap_pdr_out (abfd, intern_copy, e
452  #endif  #endif
453  }  }
454    
 #else /* MPW_C */  
 /* Same routines, but with ECOFF_64 code removed, so ^&%$#&! MPW C doesn't  
    corrupt itself and then freak out.  */  
 /* Swap in the procedure descriptor record.  */  
   
 static void  
 ecoff_swap_pdr_in (abfd, ext_copy, intern)  
      bfd *abfd;  
      PTR ext_copy;  
      PDR *intern;  
 {  
   struct pdr_ext ext[1];  
   
   *ext = *(struct pdr_ext *) ext_copy;  
   
   intern->adr           = ECOFF_GET_OFF (abfd, ext->p_adr);  
   intern->isym          = H_GET_32 (abfd, ext->p_isym);  
   intern->iline         = H_GET_32 (abfd, ext->p_iline);  
   intern->regmask       = H_GET_32 (abfd, ext->p_regmask);  
   intern->regoffset     = H_GET_S32 (abfd, ext->p_regoffset);  
   intern->iopt          = H_GET_S32 (abfd, ext->p_iopt);  
   intern->fregmask      = H_GET_32 (abfd, ext->p_fregmask);  
   intern->fregoffset    = H_GET_S32 (abfd, ext->p_fregoffset);  
   intern->frameoffset   = H_GET_S32 (abfd, ext->p_frameoffset);  
   intern->framereg      = H_GET_16 (abfd, ext->p_framereg);  
   intern->pcreg         = H_GET_16 (abfd, ext->p_pcreg);  
   intern->lnLow         = H_GET_32 (abfd, ext->p_lnLow);  
   intern->lnHigh        = H_GET_32 (abfd, ext->p_lnHigh);  
   intern->cbLineOffset  = ECOFF_GET_OFF (abfd, ext->p_cbLineOffset);  
   
 #ifdef TEST  
   if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)  
     abort ();  
 #endif  
 }  
   
 /* Swap out the procedure descriptor record.  */  
   
 static void  
 ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr)  
      bfd *abfd;  
      const PDR *intern_copy;  
      PTR ext_ptr;  
 {  
   struct pdr_ext *ext = (struct pdr_ext *) ext_ptr;  
   PDR intern[1];  
   
   *intern = *intern_copy;       /* Make it reasonable to do in-place.  */  
   
   ECOFF_PUT_OFF (abfd, intern->adr,          ext->p_adr);  
   H_PUT_32      (abfd, intern->isym,         ext->p_isym);  
   H_PUT_32      (abfd, intern->iline,        ext->p_iline);  
   H_PUT_32      (abfd, intern->regmask,      ext->p_regmask);  
   H_PUT_32      (abfd, intern->regoffset,    ext->p_regoffset);  
   H_PUT_32      (abfd, intern->iopt,         ext->p_iopt);  
   H_PUT_32      (abfd, intern->fregmask,     ext->p_fregmask);  
   H_PUT_32      (abfd, intern->fregoffset,   ext->p_fregoffset);  
   H_PUT_32      (abfd, intern->frameoffset,  ext->p_frameoffset);  
   H_PUT_16      (abfd, intern->framereg,     ext->p_framereg);  
   H_PUT_16      (abfd, intern->pcreg,        ext->p_pcreg);  
   H_PUT_32      (abfd, intern->lnLow,        ext->p_lnLow);  
   H_PUT_32      (abfd, intern->lnHigh,       ext->p_lnHigh);  
   ECOFF_PUT_OFF (abfd, intern->cbLineOffset, ext->p_cbLineOffset);  
   
 #ifdef TEST  
   if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)  
     abort ();  
 #endif  
 }  
 #endif /* MPW_C */  
   
455  /* Swap in a symbol record.  */  /* Swap in a symbol record.  */
456    
457  static void  static void
# Line 533  ecoff_swap_sym_in (abfd, ext_copy, inter Line 467  ecoff_swap_sym_in (abfd, ext_copy, inter
467    intern->iss           = H_GET_32 (abfd, ext->s_iss);    intern->iss           = H_GET_32 (abfd, ext->s_iss);
468    intern->value         = ECOFF_GET_OFF (abfd, ext->s_value);    intern->value         = ECOFF_GET_OFF (abfd, ext->s_value);
469    
470    /* now the fun stuff...  */  #if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
471    if (bfd_header_big_endian (abfd)) {    if (intern->iss == (signed long) 0xffffffff)
472      intern->st          =  (ext->s_bits1[0] & SYM_BITS1_ST_BIG)      intern->iss = -1;
473                                             >> SYM_BITS1_ST_SH_BIG;  #endif  
474      intern->sc          = ((ext->s_bits1[0] & SYM_BITS1_SC_BIG)  
475                                             << SYM_BITS1_SC_SH_LEFT_BIG)    /* Now the fun stuff...  */
476                          | ((ext->s_bits2[0] & SYM_BITS2_SC_BIG)    if (bfd_header_big_endian (abfd))
477                                             >> SYM_BITS2_SC_SH_BIG);      {
478      intern->reserved    = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_BIG);        intern->st          =  (ext->s_bits1[0] & SYM_BITS1_ST_BIG)
479      intern->index       = ((ext->s_bits2[0] & SYM_BITS2_INDEX_BIG)                                               >> SYM_BITS1_ST_SH_BIG;
480                                             << SYM_BITS2_INDEX_SH_LEFT_BIG)        intern->sc          = ((ext->s_bits1[0] & SYM_BITS1_SC_BIG)
481                          | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_BIG)                                               << SYM_BITS1_SC_SH_LEFT_BIG)
482                          | (ext->s_bits4[0] << SYM_BITS4_INDEX_SH_LEFT_BIG);                            | ((ext->s_bits2[0] & SYM_BITS2_SC_BIG)
483    } else {                                               >> SYM_BITS2_SC_SH_BIG);
484      intern->st          =  (ext->s_bits1[0] & SYM_BITS1_ST_LITTLE)        intern->reserved    = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_BIG);
485                                             >> SYM_BITS1_ST_SH_LITTLE;        intern->index       = ((ext->s_bits2[0] & SYM_BITS2_INDEX_BIG)
486      intern->sc          = ((ext->s_bits1[0] & SYM_BITS1_SC_LITTLE)                                               << SYM_BITS2_INDEX_SH_LEFT_BIG)
487                                             >> SYM_BITS1_SC_SH_LITTLE)                            | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_BIG)
488                          | ((ext->s_bits2[0] & SYM_BITS2_SC_LITTLE)                            | (ext->s_bits4[0] << SYM_BITS4_INDEX_SH_LEFT_BIG);
489                                             << SYM_BITS2_SC_SH_LEFT_LITTLE);      }
490      intern->reserved    = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_LITTLE);    else
491      intern->index       = ((ext->s_bits2[0] & SYM_BITS2_INDEX_LITTLE)      {
492                                             >> SYM_BITS2_INDEX_SH_LITTLE)        intern->st          =  (ext->s_bits1[0] & SYM_BITS1_ST_LITTLE)
493                          | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_LITTLE)                                               >> SYM_BITS1_ST_SH_LITTLE;
494                          | ((unsigned int) ext->s_bits4[0]        intern->sc          = ((ext->s_bits1[0] & SYM_BITS1_SC_LITTLE)
495                             << SYM_BITS4_INDEX_SH_LEFT_LITTLE);                                               >> SYM_BITS1_SC_SH_LITTLE)
496    }                            | ((ext->s_bits2[0] & SYM_BITS2_SC_LITTLE)
497                                                 << SYM_BITS2_SC_SH_LEFT_LITTLE);
498          intern->reserved    = 0 != (ext->s_bits2[0] & SYM_BITS2_RESERVED_LITTLE);
499          intern->index       = ((ext->s_bits2[0] & SYM_BITS2_INDEX_LITTLE)
500                                                 >> SYM_BITS2_INDEX_SH_LITTLE)
501                              | (ext->s_bits3[0] << SYM_BITS3_INDEX_SH_LEFT_LITTLE)
502                              | ((unsigned int) ext->s_bits4[0]
503                                 << SYM_BITS4_INDEX_SH_LEFT_LITTLE);
504        }
505    
506  #ifdef TEST  #ifdef TEST
507    if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)    if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
# Line 578  ecoff_swap_sym_out (abfd, intern_copy, e Line 520  ecoff_swap_sym_out (abfd, intern_copy, e
520    struct sym_ext *ext = (struct sym_ext *) ext_ptr;    struct sym_ext *ext = (struct sym_ext *) ext_ptr;
521    SYMR intern[1];    SYMR intern[1];
522    
523    *intern = *intern_copy;       /* Make it reasonable to do in-place.  */    /* Make it reasonable to do in-place.  */
524      *intern = *intern_copy;
525    
526    H_PUT_32 (abfd, intern->iss, ext->s_iss);    H_PUT_32 (abfd, intern->iss, ext->s_iss);
527    ECOFF_PUT_OFF (abfd, intern->value, ext->s_value);    ECOFF_PUT_OFF (abfd, intern->value, ext->s_value);
528    
529    /* now the fun stuff...  */    /* Now the fun stuff...  */
530    if (bfd_header_big_endian (abfd)) {    if (bfd_header_big_endian (abfd))
531      ext->s_bits1[0] = (((intern->st << SYM_BITS1_ST_SH_BIG)      {
532                          & SYM_BITS1_ST_BIG)        ext->s_bits1[0] = (((intern->st << SYM_BITS1_ST_SH_BIG)
533                         | ((intern->sc >> SYM_BITS1_SC_SH_LEFT_BIG)                            & SYM_BITS1_ST_BIG)
534                            & SYM_BITS1_SC_BIG));                           | ((intern->sc >> SYM_BITS1_SC_SH_LEFT_BIG)
535      ext->s_bits2[0] = (((intern->sc << SYM_BITS2_SC_SH_BIG)                              & SYM_BITS1_SC_BIG));
536                          & SYM_BITS2_SC_BIG)        ext->s_bits2[0] = (((intern->sc << SYM_BITS2_SC_SH_BIG)
537                         | (intern->reserved ? SYM_BITS2_RESERVED_BIG : 0)                            & SYM_BITS2_SC_BIG)
538                         | ((intern->index >> SYM_BITS2_INDEX_SH_LEFT_BIG)                           | (intern->reserved ? SYM_BITS2_RESERVED_BIG : 0)
539                            & SYM_BITS2_INDEX_BIG));                           | ((intern->index >> SYM_BITS2_INDEX_SH_LEFT_BIG)
540      ext->s_bits3[0] = (intern->index >> SYM_BITS3_INDEX_SH_LEFT_BIG) & 0xff;                              & SYM_BITS2_INDEX_BIG));
541      ext->s_bits4[0] = (intern->index >> SYM_BITS4_INDEX_SH_LEFT_BIG) & 0xff;        ext->s_bits3[0] = (intern->index >> SYM_BITS3_INDEX_SH_LEFT_BIG) & 0xff;
542    } else {        ext->s_bits4[0] = (intern->index >> SYM_BITS4_INDEX_SH_LEFT_BIG) & 0xff;
543      ext->s_bits1[0] = (((intern->st << SYM_BITS1_ST_SH_LITTLE)      }
544                          & SYM_BITS1_ST_LITTLE)    else
545                         | ((intern->sc << SYM_BITS1_SC_SH_LITTLE)      {
546                            & SYM_BITS1_SC_LITTLE));        ext->s_bits1[0] = (((intern->st << SYM_BITS1_ST_SH_LITTLE)
547      ext->s_bits2[0] = (((intern->sc >> SYM_BITS2_SC_SH_LEFT_LITTLE)                            & SYM_BITS1_ST_LITTLE)
548                          & SYM_BITS2_SC_LITTLE)                           | ((intern->sc << SYM_BITS1_SC_SH_LITTLE)
549                         | (intern->reserved ? SYM_BITS2_RESERVED_LITTLE : 0)                              & SYM_BITS1_SC_LITTLE));
550                         | ((intern->index << SYM_BITS2_INDEX_SH_LITTLE)        ext->s_bits2[0] = (((intern->sc >> SYM_BITS2_SC_SH_LEFT_LITTLE)
551                            & SYM_BITS2_INDEX_LITTLE));                            & SYM_BITS2_SC_LITTLE)
552      ext->s_bits3[0] = (intern->index >> SYM_BITS3_INDEX_SH_LEFT_LITTLE) & 0xff;                           | (intern->reserved ? SYM_BITS2_RESERVED_LITTLE : 0)
553      ext->s_bits4[0] = (intern->index >> SYM_BITS4_INDEX_SH_LEFT_LITTLE) & 0xff;                           | ((intern->index << SYM_BITS2_INDEX_SH_LITTLE)
554    }                              & SYM_BITS2_INDEX_LITTLE));
555          ext->s_bits3[0] = (intern->index >> SYM_BITS3_INDEX_SH_LEFT_LITTLE) & 0xff;
556          ext->s_bits4[0] = (intern->index >> SYM_BITS4_INDEX_SH_LEFT_LITTLE) & 0xff;
557        }
558    
559  #ifdef TEST  #ifdef TEST
560    if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)    if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
# Line 628  ecoff_swap_ext_in (abfd, ext_copy, inter Line 574  ecoff_swap_ext_in (abfd, ext_copy, inter
574    
575    *ext = *(struct ext_ext *) ext_copy;    *ext = *(struct ext_ext *) ext_copy;
576    
577    /* now the fun stuff...  */    /* Now the fun stuff...  */
578    if (bfd_header_big_endian (abfd)) {    if (bfd_header_big_endian (abfd))
579      intern->jmptbl      = 0 != (ext->es_bits1[0] & EXT_BITS1_JMPTBL_BIG);      {
580      intern->cobol_main  = 0 != (ext->es_bits1[0] & EXT_BITS1_COBOL_MAIN_BIG);        intern->jmptbl      = 0 != (ext->es_bits1[0] & EXT_BITS1_JMPTBL_BIG);
581      intern->weakext     = 0 != (ext->es_bits1[0] & EXT_BITS1_WEAKEXT_BIG);        intern->cobol_main  = 0 != (ext->es_bits1[0] & EXT_BITS1_COBOL_MAIN_BIG);
582    } else {        intern->weakext     = 0 != (ext->es_bits1[0] & EXT_BITS1_WEAKEXT_BIG);
583      intern->jmptbl      = 0 != (ext->es_bits1[0] & EXT_BITS1_JMPTBL_LITTLE);      }
584      intern->cobol_main  = 0 != (ext->es_bits1[0] & EXT_BITS1_COBOL_MAIN_LITTLE);    else
585      intern->weakext     = 0 != (ext->es_bits1[0] & EXT_BITS1_WEAKEXT_LITTLE);      {
586    }        intern->jmptbl      = 0 != (ext->es_bits1[0] & EXT_BITS1_JMPTBL_LITTLE);
587          intern->cobol_main  = 0 != (ext->es_bits1[0] & EXT_BITS1_COBOL_MAIN_LITTLE);
588          intern->weakext     = 0 != (ext->es_bits1[0] & EXT_BITS1_WEAKEXT_LITTLE);
589        }
590    intern->reserved = 0;    intern->reserved = 0;
591    
592  #if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)  #if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
593    intern->ifd           = H_GET_S16 (abfd, ext->es_ifd);    intern->ifd = H_GET_S16 (abfd, ext->es_ifd);
594  #endif  #endif
595  #if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)  #if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
596    intern->ifd           = H_GET_S32 (abfd, ext->es_ifd);    intern->ifd = H_GET_S32 (abfd, ext->es_ifd);
597  #endif  #endif
598    
599    ecoff_swap_sym_in (abfd, &ext->es_asym, &intern->asym);    ecoff_swap_sym_in (abfd, &ext->es_asym, &intern->asym);
# Line 666  ecoff_swap_ext_out (abfd, intern_copy, e Line 615  ecoff_swap_ext_out (abfd, intern_copy, e
615    struct ext_ext *ext = (struct ext_ext *) ext_ptr;    struct ext_ext *ext = (struct ext_ext *) ext_ptr;
616    EXTR intern[1];    EXTR intern[1];
617    
618    *intern = *intern_copy;       /* Make it reasonable to do in-place.  */    /* Make it reasonable to do in-place.  */
619      *intern = *intern_copy;
620    
621    /* now the fun stuff...  */    /* Now the fun stuff...  */
622    if (bfd_header_big_endian (abfd)) {    if (bfd_header_big_endian (abfd))
623      ext->es_bits1[0] = ((intern->jmptbl ? EXT_BITS1_JMPTBL_BIG : 0)      {
624                          | (intern->cobol_main ? EXT_BITS1_COBOL_MAIN_BIG : 0)        ext->es_bits1[0] = ((intern->jmptbl ? EXT_BITS1_JMPTBL_BIG : 0)
625                          | (intern->weakext ? EXT_BITS1_WEAKEXT_BIG : 0));                            | (intern->cobol_main ? EXT_BITS1_COBOL_MAIN_BIG : 0)
626      ext->es_bits2[0] = 0;                            | (intern->weakext ? EXT_BITS1_WEAKEXT_BIG : 0));
627          ext->es_bits2[0] = 0;
628  #if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)  #if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
629      ext->es_bits2[1] = 0;        ext->es_bits2[1] = 0;
630      ext->es_bits2[2] = 0;        ext->es_bits2[2] = 0;
631  #endif  #endif
632    } else {      }
633      ext->es_bits1[0] = ((intern->jmptbl ? EXT_BITS1_JMPTBL_LITTLE : 0)    else
634                          | (intern->cobol_main ? EXT_BITS1_COBOL_MAIN_LITTLE : 0)      {
635                          | (intern->weakext ? EXT_BITS1_WEAKEXT_LITTLE : 0));        ext->es_bits1[0] = ((intern->jmptbl ? EXT_BITS1_JMPTBL_LITTLE : 0)
636      ext->es_bits2[0] = 0;                            | (intern->cobol_main ? EXT_BITS1_COBOL_MAIN_LITTLE : 0)
637                              | (intern->weakext ? EXT_BITS1_WEAKEXT_LITTLE : 0));
638          ext->es_bits2[0] = 0;
639  #if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)  #if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
640      ext->es_bits2[1] = 0;        ext->es_bits2[1] = 0;
641      ext->es_bits2[2] = 0;        ext->es_bits2[2] = 0;
642  #endif  #endif
643    }      }
644    
645  #if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)  #if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
646    H_PUT_S16 (abfd, intern->ifd, ext->es_ifd);    H_PUT_S16 (abfd, intern->ifd, ext->es_ifd);
# Line 792  ecoff_swap_opt_out (abfd, intern_copy, e Line 745  ecoff_swap_opt_out (abfd, intern_copy, e
745    struct opt_ext *ext = (struct opt_ext *) ext_ptr;    struct opt_ext *ext = (struct opt_ext *) ext_ptr;
746    OPTR intern[1];    OPTR intern[1];
747    
748    *intern = *intern_copy;       /* Make it reasonable to do in-place.  */    /* Make it reasonable to do in-place.  */
749      *intern = *intern_copy;
750    
751    if (bfd_header_big_endian (abfd))    if (bfd_header_big_endian (abfd))
752      {      {
# Line 852  ecoff_swap_dnr_out (abfd, intern_copy, e Line 806  ecoff_swap_dnr_out (abfd, intern_copy, e
806    struct dnr_ext *ext = (struct dnr_ext *) ext_ptr;    struct dnr_ext *ext = (struct dnr_ext *) ext_ptr;
807    DNR intern[1];    DNR intern[1];
808    
809    *intern = *intern_copy;       /* Make it reasonable to do in-place.  */    /* Make it reasonable to do in-place.  */
810      *intern = *intern_copy;
811    
812    H_PUT_32 (abfd, intern->rfd, ext->d_rfd);    H_PUT_32 (abfd, intern->rfd, ext->d_rfd);
813    H_PUT_32 (abfd, intern->index, ext->d_index);    H_PUT_32 (abfd, intern->index, ext->d_index);

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.1.1.1.20.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26