Ignore:
Timestamp:
Aug 16, 2003, 6:59:22 PM (22 years ago)
Author:
bird
Message:

binutils v2.14 - offical sources.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/binutils/bfd/coff-i386.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* BFD back-end for Intel 386 COFF files.
    22   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    3    2000, 2001
     3   2000, 2001, 2002
    44   Free Software Foundation, Inc.
    55   Written by Cygnus Support.
     
    118118             generate a non-PE executable, we have to compensate it
    119119             here.  */
    120           if (howto->pc_relative == true && howto->pcrel_offset == true)
     120          if (howto->pc_relative && howto->pcrel_offset)
    121121            diff = -(1 << howto->size);
    122122          else
     
    158158              short x = bfd_get_16 (abfd, addr);
    159159              DOIT (x);
    160               bfd_put_16 (abfd, x, addr);
     160              bfd_put_16 (abfd, (bfd_vma) x, addr);
    161161            }
    162162            break;
     
    166166              long x = bfd_get_32 (abfd, addr);
    167167              DOIT (x);
    168               bfd_put_32 (abfd, x, addr);
     168              bfd_put_32 (abfd, (bfd_vma) x, addr);
    169169            }
    170170            break;
     
    180180
    181181#ifdef COFF_WITH_PE
    182 /* Return true if this relocation should appear in the output .reloc
     182/* Return TRUE if this relocation should appear in the output .reloc
    183183   section.  */
    184184
    185 static boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
    186 
    187 static boolean in_reloc_p (abfd, howto)
     185static bfd_boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
     186
     187static bfd_boolean in_reloc_p (abfd, howto)
    188188     bfd * abfd ATTRIBUTE_UNUSED;
    189189     reloc_howto_type *howto;
     
    194194
    195195#ifndef PCRELOFFSET
    196 #define PCRELOFFSET false
     196#define PCRELOFFSET FALSE
    197197#endif
    198198
     
    209209         2,                     /* size (0 = byte, 1 = short, 2 = long) */
    210210         32,                    /* bitsize */
    211          false,                 /* pc_relative */
     211         FALSE,                 /* pc_relative */
    212212         0,                     /* bitpos */
    213213         complain_overflow_bitfield, /* complain_on_overflow */
    214214         coff_i386_reloc,       /* special_function */
    215215         "dir32",               /* name */
    216          true,                  /* partial_inplace */
     216         TRUE,                  /* partial_inplace */
    217217         0xffffffff,            /* src_mask */
    218218         0xffffffff,            /* dst_mask */
    219          true),                 /* pcrel_offset */
     219         TRUE),                 /* pcrel_offset */
    220220  /* PE IMAGE_REL_I386_DIR32NB relocation (7).  */
    221221  HOWTO (R_IMAGEBASE,           /* type */
     
    223223         2,                     /* size (0 = byte, 1 = short, 2 = long) */
    224224         32,                    /* bitsize */
    225          false,                 /* pc_relative */
     225         FALSE,                 /* pc_relative */
    226226         0,                     /* bitpos */
    227227         complain_overflow_bitfield, /* complain_on_overflow */
    228228         coff_i386_reloc,       /* special_function */
    229229         "rva32",               /* name */
    230          true,                  /* partial_inplace */
     230         TRUE,                  /* partial_inplace */
    231231         0xffffffff,            /* src_mask */
    232232         0xffffffff,            /* dst_mask */
    233          false),                /* pcrel_offset */
     233         FALSE),                /* pcrel_offset */
    234234  EMPTY_HOWTO (010),
    235235  EMPTY_HOWTO (011),
     
    244244         0,                     /* size (0 = byte, 1 = short, 2 = long) */
    245245         8,                     /* bitsize */
    246          false,                 /* pc_relative */
     246         FALSE,                 /* pc_relative */
    247247         0,                     /* bitpos */
    248248         complain_overflow_bitfield, /* complain_on_overflow */
    249249         coff_i386_reloc,       /* special_function */
    250250         "8",                   /* name */
    251          true,                  /* partial_inplace */
     251         TRUE,                  /* partial_inplace */
    252252         0x000000ff,            /* src_mask */
    253253         0x000000ff,            /* dst_mask */
     
    258258         1,                     /* size (0 = byte, 1 = short, 2 = long) */
    259259         16,                    /* bitsize */
    260          false,                 /* pc_relative */
     260         FALSE,                 /* pc_relative */
    261261         0,                     /* bitpos */
    262262         complain_overflow_bitfield, /* complain_on_overflow */
    263263         coff_i386_reloc,       /* special_function */
    264264         "16",                  /* name */
    265          true,                  /* partial_inplace */
     265         TRUE,                  /* partial_inplace */
    266266         0x0000ffff,            /* src_mask */
    267267         0x0000ffff,            /* dst_mask */
     
    272272         2,                     /* size (0 = byte, 1 = short, 2 = long) */
    273273         32,                    /* bitsize */
    274          false,                 /* pc_relative */
     274         FALSE,                 /* pc_relative */
    275275         0,                     /* bitpos */
    276276         complain_overflow_bitfield, /* complain_on_overflow */
    277277         coff_i386_reloc,       /* special_function */
    278278         "32",                  /* name */
    279          true,                  /* partial_inplace */
     279         TRUE,                  /* partial_inplace */
    280280         0xffffffff,            /* src_mask */
    281281         0xffffffff,            /* dst_mask */
     
    286286         0,                     /* size (0 = byte, 1 = short, 2 = long) */
    287287         8,                     /* bitsize */
    288          true,                  /* pc_relative */
     288         TRUE,                  /* pc_relative */
    289289         0,                     /* bitpos */
    290290         complain_overflow_signed, /* complain_on_overflow */
    291291         coff_i386_reloc,       /* special_function */
    292292         "DISP8",               /* name */
    293          true,                  /* partial_inplace */
     293         TRUE,                  /* partial_inplace */
    294294         0x000000ff,            /* src_mask */
    295295         0x000000ff,            /* dst_mask */
     
    300300         1,                     /* size (0 = byte, 1 = short, 2 = long) */
    301301         16,                    /* bitsize */
    302          true,                  /* pc_relative */
     302         TRUE,                  /* pc_relative */
    303303         0,                     /* bitpos */
    304304         complain_overflow_signed, /* complain_on_overflow */
    305305         coff_i386_reloc,       /* special_function */
    306306         "DISP16",              /* name */
    307          true,                  /* partial_inplace */
     307         TRUE,                  /* partial_inplace */
    308308         0x0000ffff,            /* src_mask */
    309309         0x0000ffff,            /* dst_mask */
     
    314314         2,                     /* size (0 = byte, 1 = short, 2 = long) */
    315315         32,                    /* bitsize */
    316          true,                  /* pc_relative */
     316         TRUE,                  /* pc_relative */
    317317         0,                     /* bitpos */
    318318         complain_overflow_signed, /* complain_on_overflow */
    319319         coff_i386_reloc,       /* special_function */
    320320         "DISP32",              /* name */
    321          true,                  /* partial_inplace */
     321         TRUE,                  /* partial_inplace */
    322322         0xffffffff,            /* src_mask */
    323323         0xffffffff,            /* dst_mask */
     
    389389   relocateable link.  */
    390390
    391 static boolean coff_pe_i386_relocate_section
     391static bfd_boolean coff_pe_i386_relocate_section
    392392  PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
    393393           struct internal_reloc *, struct internal_syment *, asection **));
    394394
    395 static boolean
     395static bfd_boolean
    396396coff_pe_i386_relocate_section (output_bfd, info, input_bfd,
    397397                               input_section, contents, relocs, syms,
     
    407407{
    408408  if (info->relocateable)
    409     return true;
     409    return TRUE;
    410410
    411411  return _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
     
    540540   we treat all symbols starting with L as local.  */
    541541
    542 static boolean coff_i386_is_local_label_name PARAMS ((bfd *, const char *));
    543 
    544 static boolean
     542static bfd_boolean coff_i386_is_local_label_name
     543  PARAMS ((bfd *, const char *));
     544
     545static bfd_boolean
    545546coff_i386_is_local_label_name (abfd, name)
    546547     bfd *abfd;
     
    548549{
    549550  if (name[0] == 'L')
    550     return true;
     551    return TRUE;
    551552
    552553  return _bfd_coff_is_local_label_name (abfd, name);
Note: See TracChangeset for help on using the changeset viewer.