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/nlm32-alpha.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r608 r609  
    11/* Support for 32-bit Alpha NLM (NetWare Loadable Module)
    2    Copyright 1993, 1994, 2000, 2001 Free Software Foundation, Inc.
     2   Copyright 1993, 1994, 2000, 2001, 2002 Free Software Foundation, Inc.
    33   Written by Ian Lance Taylor, Cygnus Support.
    44
     
    3434#include "libnlm.h"
    3535
    36 static boolean nlm_alpha_backend_object_p
     36static bfd_boolean nlm_alpha_backend_object_p
    3737  PARAMS ((bfd *));
    38 static boolean nlm_alpha_write_prefix
     38static bfd_boolean nlm_alpha_write_prefix
    3939  PARAMS ((bfd *));
    40 static boolean nlm_alpha_read_reloc
     40static bfd_boolean nlm_alpha_read_reloc
    4141  PARAMS ((bfd *, nlmNAME(symbol_type) *, asection **, arelent *));
    42 static boolean nlm_alpha_mangle_relocs
     42static bfd_boolean nlm_alpha_mangle_relocs
    4343  PARAMS ((bfd *, asection *, PTR, bfd_vma, bfd_size_type));
    44 static boolean nlm_alpha_read_import
     44static bfd_boolean nlm_alpha_read_import
    4545  PARAMS ((bfd *, nlmNAME(symbol_type) *));
    46 static boolean nlm_alpha_write_import
     46static bfd_boolean nlm_alpha_write_import
    4747  PARAMS ((bfd *, asection *, arelent *));
    48 static boolean nlm_alpha_set_public_section
     48static bfd_boolean nlm_alpha_set_public_section
    4949  PARAMS ((bfd *, nlmNAME(symbol_type) *));
    5050static bfd_vma nlm_alpha_get_public_offset
    5151  PARAMS ((bfd *, asymbol *));
    52 static boolean nlm_alpha_write_external
     52static bfd_boolean nlm_alpha_write_external
    5353  PARAMS ((bfd *, bfd_size_type, asymbol *, struct reloc_and_sec *));
    5454
     
    5858   the location before the regular NLM header.  */
    5959
    60 static boolean
     60static bfd_boolean
    6161nlm_alpha_backend_object_p (abfd)
    6262     bfd *abfd;
    6363{
    6464  struct nlm32_alpha_external_prefix_header s;
    65   bfd_size_type size;
    66 
    67   if (bfd_read ((PTR) &s, sizeof s, 1, abfd) != sizeof s)
    68     return false;
    69 
    70   if (bfd_h_get_32 (abfd, s.magic) != NLM32_ALPHA_MAGIC)
    71     return false;
     65  file_ptr size;
     66
     67  if (bfd_bread ((PTR) &s, (bfd_size_type) sizeof s, abfd) != sizeof s)
     68    return FALSE;
     69
     70  if (H_GET_32 (abfd, s.magic) != NLM32_ALPHA_MAGIC)
     71    return FALSE;
    7272
    7373  /* FIXME: Should we check the format number?  */
    7474
    7575  /* Skip to the end of the header.  */
    76   size = bfd_h_get_32 (abfd, s.size);
     76  size = H_GET_32 (abfd, s.size);
    7777  if (bfd_seek (abfd, size, SEEK_SET) != 0)
    78     return false;
    79 
    80   return true;
     78    return FALSE;
     79
     80  return TRUE;
    8181}
    8282
    8383/* Write out the prefix.  */
    8484
    85 static boolean
     85static bfd_boolean
    8686nlm_alpha_write_prefix (abfd)
    8787     bfd *abfd;
     
    9090
    9191  memset (&s, 0, sizeof s);
    92   bfd_h_put_32 (abfd, (bfd_vma) NLM32_ALPHA_MAGIC, s.magic);
    93   bfd_h_put_32 (abfd, (bfd_vma) 2, s.format);
    94   bfd_h_put_32 (abfd, (bfd_vma) sizeof s, s.size);
    95   if (bfd_write ((PTR) &s, sizeof s, 1, abfd) != sizeof s)
    96     return false;
    97   return true;
     92  H_PUT_32 (abfd, NLM32_ALPHA_MAGIC, s.magic);
     93  H_PUT_32 (abfd, 2, s.format);
     94  H_PUT_32 (abfd, sizeof s, s.size);
     95  if (bfd_bwrite ((PTR) &s, (bfd_size_type) sizeof s, abfd) != sizeof s)
     96    return FALSE;
     97  return TRUE;
    9898}
    9999
     
    110110         0,                     /* size (0 = byte, 1 = short, 2 = long) */
    111111         8,                     /* bitsize */
    112          false,                 /* pc_relative */
     112         FALSE,                 /* pc_relative */
    113113         0,                     /* bitpos */
    114114         complain_overflow_dont, /* complain_on_overflow */
    115115         0,                     /* special_function */
    116116         "IGNORE",              /* name */
    117          false,                 /* partial_inplace */
     117         FALSE,                 /* partial_inplace */
    118118         0,                     /* src_mask */
    119119         0,                     /* dst_mask */
    120          false),                /* pcrel_offset */
     120         FALSE),                /* pcrel_offset */
    121121
    122122  /* A 32 bit reference to a symbol.  */
     
    125125         2,                     /* size (0 = byte, 1 = short, 2 = long) */
    126126         32,                    /* bitsize */
    127          false,                 /* pc_relative */
     127         FALSE,                 /* pc_relative */
    128128         0,                     /* bitpos */
    129129         complain_overflow_bitfield, /* complain_on_overflow */
    130130         0,                     /* special_function */
    131131         "REFLONG",             /* name */
    132          true,                  /* partial_inplace */
     132         TRUE,                  /* partial_inplace */
    133133         0xffffffff,            /* src_mask */
    134134         0xffffffff,            /* dst_mask */
    135          false),                /* pcrel_offset */
     135         FALSE),                /* pcrel_offset */
    136136
    137137  /* A 64 bit reference to a symbol.  */
     
    140140         4,                     /* size (0 = byte, 1 = short, 2 = long) */
    141141         64,                    /* bitsize */
    142          false,                 /* pc_relative */
     142         FALSE,                 /* pc_relative */
    143143         0,                     /* bitpos */
    144144         complain_overflow_bitfield, /* complain_on_overflow */
    145145         0,                     /* special_function */
    146146         "REFQUAD",             /* name */
    147          true,                  /* partial_inplace */
     147         TRUE,                  /* partial_inplace */
    148148         0xffffffffffffffff,    /* src_mask */
    149149         0xffffffffffffffff,    /* dst_mask */
    150          false),                /* pcrel_offset */
     150         FALSE),                /* pcrel_offset */
    151151
    152152  /* A 32 bit GP relative offset.  This is just like REFLONG except
     
    157157         2,                     /* size (0 = byte, 1 = short, 2 = long) */
    158158         32,                    /* bitsize */
    159          false,                 /* pc_relative */
     159         FALSE,                 /* pc_relative */
    160160         0,                     /* bitpos */
    161161         complain_overflow_bitfield, /* complain_on_overflow */
    162162         0,                     /* special_function */
    163163         "GPREL32",             /* name */
    164          true,                  /* partial_inplace */
     164         TRUE,                  /* partial_inplace */
    165165         0xffffffff,            /* src_mask */
    166166         0xffffffff,            /* dst_mask */
    167          false),                /* pcrel_offset */
     167         FALSE),                /* pcrel_offset */
    168168
    169169  /* Used for an instruction that refers to memory off the GP
     
    174174         2,                     /* size (0 = byte, 1 = short, 2 = long) */
    175175         16,                    /* bitsize */
    176          false,                 /* pc_relative */
     176         FALSE,                 /* pc_relative */
    177177         0,                     /* bitpos */
    178178         complain_overflow_signed, /* complain_on_overflow */
    179179         0,                     /* special_function */
    180180         "LITERAL",             /* name */
    181          true,                  /* partial_inplace */
     181         TRUE,                  /* partial_inplace */
    182182         0xffff,                /* src_mask */
    183183         0xffff,                /* dst_mask */
    184          false),                /* pcrel_offset */
     184         FALSE),                /* pcrel_offset */
    185185
    186186  /* This reloc only appears immediately following a LITERAL reloc.
     
    197197         2,                     /* size (0 = byte, 1 = short, 2 = long) */
    198198         32,                    /* bitsize */
    199          false,                 /* pc_relative */
     199         FALSE,                 /* pc_relative */
    200200         0,                     /* bitpos */
    201201         complain_overflow_dont, /* complain_on_overflow */
    202202         0,                     /* special_function */
    203203         "LITUSE",              /* name */
    204          false,                 /* partial_inplace */
     204         FALSE,                 /* partial_inplace */
    205205         0,                     /* src_mask */
    206206         0,                     /* dst_mask */
    207          false),                /* pcrel_offset */
     207         FALSE),                /* pcrel_offset */
    208208
    209209  /* Load the gp register.  This is always used for a ldah instruction
     
    222222         2,                     /* size (0 = byte, 1 = short, 2 = long) */
    223223         16,                    /* bitsize */
    224          true,                  /* pc_relative */
     224         TRUE,                  /* pc_relative */
    225225         0,                     /* bitpos */
    226226         complain_overflow_dont, /* complain_on_overflow */
    227227         0,                     /* special_function */
    228228         "GPDISP",              /* name */
    229          true,                  /* partial_inplace */
     229         TRUE,                  /* partial_inplace */
    230230         0xffff,                /* src_mask */
    231231         0xffff,                /* dst_mask */
    232          true),                 /* pcrel_offset */
     232         TRUE),                 /* pcrel_offset */
    233233
    234234  /* A 21 bit branch.  The native assembler generates these for
     
    240240         2,                     /* size (0 = byte, 1 = short, 2 = long) */
    241241         21,                    /* bitsize */
    242          true,                  /* pc_relative */
     242         TRUE,                  /* pc_relative */
    243243         0,                     /* bitpos */
    244244         complain_overflow_signed, /* complain_on_overflow */
    245245         0,                     /* special_function */
    246246         "BRADDR",              /* name */
    247          false,                 /* partial_inplace */
     247         FALSE,                 /* partial_inplace */
    248248         0,                     /* src_mask */
    249249         0x1fffff,              /* dst_mask */
    250          false),                /* pcrel_offset */
     250         FALSE),                /* pcrel_offset */
    251251
    252252  /* A hint for a jump to a register.  */
     
    255255         2,                     /* size (0 = byte, 1 = short, 2 = long) */
    256256         14,                    /* bitsize */
    257          false,                 /* pc_relative */
     257         FALSE,                 /* pc_relative */
    258258         0,                     /* bitpos */
    259259         complain_overflow_dont, /* complain_on_overflow */
    260260         0,                     /* special_function */
    261261         "HINT",                /* name */
    262          true,                  /* partial_inplace */
     262         TRUE,                  /* partial_inplace */
    263263         0x3fff,                /* src_mask */
    264264         0x3fff,                /* dst_mask */
    265          false),                /* pcrel_offset */
     265         FALSE),                /* pcrel_offset */
    266266
    267267  /* 16 bit PC relative offset.  */
     
    270270         1,                     /* size (0 = byte, 1 = short, 2 = long) */
    271271         16,                    /* bitsize */
    272          true,                  /* pc_relative */
     272         TRUE,                  /* pc_relative */
    273273         0,                     /* bitpos */
    274274         complain_overflow_signed, /* complain_on_overflow */
    275275         0,                     /* special_function */
    276276         "SREL16",              /* name */
    277          true,                  /* partial_inplace */
     277         TRUE,                  /* partial_inplace */
    278278         0xffff,                /* src_mask */
    279279         0xffff,                /* dst_mask */
    280          false),                /* pcrel_offset */
     280         FALSE),                /* pcrel_offset */
    281281
    282282  /* 32 bit PC relative offset.  */
     
    285285         2,                     /* size (0 = byte, 1 = short, 2 = long) */
    286286         32,                    /* bitsize */
    287          true,                  /* pc_relative */
     287         TRUE,                  /* pc_relative */
    288288         0,                     /* bitpos */
    289289         complain_overflow_signed, /* complain_on_overflow */
    290290         0,                     /* special_function */
    291291         "SREL32",              /* name */
    292          true,                  /* partial_inplace */
     292         TRUE,                  /* partial_inplace */
    293293         0xffffffff,            /* src_mask */
    294294         0xffffffff,            /* dst_mask */
    295          false),                /* pcrel_offset */
     295         FALSE),                /* pcrel_offset */
    296296
    297297  /* A 64 bit PC relative offset.  */
     
    300300         4,                     /* size (0 = byte, 1 = short, 2 = long) */
    301301         64,                    /* bitsize */
    302          true,                  /* pc_relative */
     302         TRUE,                  /* pc_relative */
    303303         0,                     /* bitpos */
    304304         complain_overflow_signed, /* complain_on_overflow */
    305305         0,                     /* special_function */
    306306         "SREL64",              /* name */
    307          true,                  /* partial_inplace */
     307         TRUE,                  /* partial_inplace */
    308308         0xffffffffffffffff,    /* src_mask */
    309309         0xffffffffffffffff,    /* dst_mask */
    310          false),                /* pcrel_offset */
     310         FALSE),                /* pcrel_offset */
    311311
    312312  /* Push a value on the reloc evaluation stack.  */
     
    315315         0,                     /* size (0 = byte, 1 = short, 2 = long) */
    316316         0,                     /* bitsize */
    317          false,                 /* pc_relative */
     317         FALSE,                 /* pc_relative */
    318318         0,                     /* bitpos */
    319319         complain_overflow_dont, /* complain_on_overflow */
    320320         0,                     /* special_function */
    321321         "OP_PUSH",             /* name */
    322          false,                 /* partial_inplace */
     322         FALSE,                 /* partial_inplace */
    323323         0,                     /* src_mask */
    324324         0,                     /* dst_mask */
    325          false),                /* pcrel_offset */
     325         FALSE),                /* pcrel_offset */
    326326
    327327  /* Store the value from the stack at the given address.  Store it in
     
    331331         4,                     /* size (0 = byte, 1 = short, 2 = long) */
    332332         64,                    /* bitsize */
    333          false,                 /* pc_relative */
     333         FALSE,                 /* pc_relative */
    334334         0,                     /* bitpos */
    335335         complain_overflow_dont, /* complain_on_overflow */
    336336         0,                     /* special_function */
    337337         "OP_STORE",            /* name */
    338          false,                 /* partial_inplace */
     338         FALSE,                 /* partial_inplace */
    339339         0,                     /* src_mask */
    340340         0xffffffffffffffff,    /* dst_mask */
    341          false),                /* pcrel_offset */
     341         FALSE),                /* pcrel_offset */
    342342
    343343  /* Subtract the reloc address from the value on the top of the
     
    347347         0,                     /* size (0 = byte, 1 = short, 2 = long) */
    348348         0,                     /* bitsize */
    349          false,                 /* pc_relative */
     349         FALSE,                 /* pc_relative */
    350350         0,                     /* bitpos */
    351351         complain_overflow_dont, /* complain_on_overflow */
    352352         0,                     /* special_function */
    353353         "OP_PSUB",             /* name */
    354          false,                 /* partial_inplace */
     354         FALSE,                 /* partial_inplace */
    355355         0,                     /* src_mask */
    356356         0,                     /* dst_mask */
    357          false),                /* pcrel_offset */
     357         FALSE),                /* pcrel_offset */
    358358
    359359  /* Shift the value on the top of the relocation stack right by the
     
    363363         0,                     /* size (0 = byte, 1 = short, 2 = long) */
    364364         0,                     /* bitsize */
    365          false,                 /* pc_relative */
     365         FALSE,                 /* pc_relative */
    366366         0,                     /* bitpos */
    367367         complain_overflow_dont, /* complain_on_overflow */
    368368         0,                      /* special_function */
    369369         "OP_PRSHIFT",          /* name */
    370          false,                 /* partial_inplace */
     370         FALSE,                 /* partial_inplace */
    371371         0,                     /* src_mask */
    372372         0,                     /* dst_mask */
    373          false),                /* pcrel_offset */
     373         FALSE),                /* pcrel_offset */
    374374
    375375  /* Adjust the GP value for a new range in the object file.  */
     
    378378         0,                     /* size (0 = byte, 1 = short, 2 = long) */
    379379         0,                     /* bitsize */
    380          false,                 /* pc_relative */
     380         FALSE,                 /* pc_relative */
    381381         0,                     /* bitpos */
    382382         complain_overflow_dont, /* complain_on_overflow */
    383383         0,                     /* special_function */
    384384         "GPVALUE",             /* name */
    385          false,                 /* partial_inplace */
     385         FALSE,                 /* partial_inplace */
    386386         0,                     /* src_mask */
    387387         0,                     /* dst_mask */
    388          false)                 /* pcrel_offset */
     388         FALSE)                 /* pcrel_offset */
    389389};
    390390
     
    394394         0,                     /* size (0 = byte, 1 = short, 2 = long) */
    395395         0,                     /* bitsize */
    396          false,                 /* pc_relative */
     396         FALSE,                 /* pc_relative */
    397397         0,                     /* bitpos */
    398398         complain_overflow_dont, /* complain_on_overflow */
    399399         0,                     /* special_function */
    400400         "NW_RELOC",            /* name */
    401          false,                 /* partial_inplace */
     401         FALSE,                 /* partial_inplace */
    402402         0,                     /* src_mask */
    403403         0,                     /* dst_mask */
    404          false);                /* pcrel_offset */
     404         FALSE);                /* pcrel_offset */
    405405
    406406/* Read an Alpha NLM reloc.  This routine keeps some static data which
     
    408408   because all the local relocs are read at once.  */
    409409
    410 static boolean
     410static bfd_boolean
    411411nlm_alpha_read_reloc (abfd, sym, secp, rel)
    412412     bfd *abfd;
     
    424424
    425425  /* Read the reloc from the file.  */
    426   if (bfd_read (&ext, sizeof ext, 1, abfd) != sizeof ext)
    427     return false;
     426  if (bfd_bread (&ext, (bfd_size_type) sizeof ext, abfd) != sizeof ext)
     427    return FALSE;
    428428
    429429  /* Swap in the reloc information.  */
    430   r_vaddr = bfd_h_get_64 (abfd, (bfd_byte *) ext.r_vaddr);
    431   r_symndx = bfd_h_get_32 (abfd, (bfd_byte *) ext.r_symndx);
     430  r_vaddr = H_GET_64 (abfd, ext.r_vaddr);
     431  r_symndx = H_GET_32 (abfd, ext.r_symndx);
    432432
    433433  BFD_ASSERT (bfd_little_endian (abfd));
     
    599599    rel->howto = &nlm32_alpha_howto_table[r_type];
    600600
    601   return true;
     601  return TRUE;
    602602}
    603603
    604604/* Mangle Alpha NLM relocs for output.  */
    605605
    606 static boolean
     606static bfd_boolean
    607607nlm_alpha_mangle_relocs (abfd, sec, data, offset, count)
    608608     bfd *abfd ATTRIBUTE_UNUSED;
     
    612612     bfd_size_type count ATTRIBUTE_UNUSED;
    613613{
    614   return true;
     614  return TRUE;
    615615}
    616616
    617617/* Read an ALPHA NLM import record */
    618618
    619 static boolean
     619static bfd_boolean
    620620nlm_alpha_read_import (abfd, sym)
    621621     bfd *abfd;
     
    627627  unsigned char symlength;              /* length of symbol name */
    628628  char *name;
    629 
    630   if (bfd_read ((PTR) &symlength, sizeof (symlength), 1, abfd)
     629  bfd_size_type amt;
     630
     631  if (bfd_bread ((PTR) &symlength, (bfd_size_type) sizeof (symlength), abfd)
    631632      != sizeof (symlength))
    632     return false;
     633    return FALSE;
    633634  sym -> symbol.the_bfd = abfd;
    634   name = bfd_alloc (abfd, symlength + 1);
     635  name = bfd_alloc (abfd, (bfd_size_type) symlength + 1);
    635636  if (name == NULL)
    636     return false;
    637   if (bfd_read (name, symlength, 1, abfd) != symlength)
    638     return false;
     637    return FALSE;
     638  if (bfd_bread (name, (bfd_size_type) symlength, abfd) != symlength)
     639    return FALSE;
    639640  name[symlength] = '\0';
    640641  sym -> symbol.name = name;
     
    642643  sym -> symbol.value = 0;
    643644  sym -> symbol.section = bfd_und_section_ptr;
    644   if (bfd_read ((PTR) temp, sizeof (temp), 1, abfd) != sizeof (temp))
    645     return false;
    646   rcount = bfd_h_get_32 (abfd, temp);
    647   nlm_relocs = ((struct nlm_relent *)
    648                 bfd_alloc (abfd, rcount * sizeof (struct nlm_relent)));
     645  if (bfd_bread ((PTR) temp, (bfd_size_type) sizeof (temp), abfd)
     646      != sizeof (temp))
     647    return FALSE;
     648  rcount = H_GET_32 (abfd, temp);
     649  amt = rcount * sizeof (struct nlm_relent);
     650  nlm_relocs = (struct nlm_relent *) bfd_alloc (abfd, amt);
    649651  if (!nlm_relocs)
    650     return false;
     652    return FALSE;
    651653  sym -> relocs = nlm_relocs;
    652654  sym -> rcnt = 0;
     
    655657      asection *section;
    656658
    657       if (nlm_alpha_read_reloc (abfd, sym, &section,
    658                                 &nlm_relocs -> reloc)
    659           == false)
    660         return false;
     659      if (! nlm_alpha_read_reloc (abfd, sym, &section, &nlm_relocs -> reloc))
     660        return FALSE;
    661661      nlm_relocs -> section = section;
    662662      nlm_relocs++;
     
    664664    }
    665665
    666   return true;
     666  return TRUE;
    667667}
    668668
    669669/* Write an Alpha NLM reloc.  */
    670670
    671 static boolean
     671static bfd_boolean
    672672nlm_alpha_write_import (abfd, sec, rel)
    673673     bfd *abfd;
     
    753753
    754754  /* Swap out the relocation fields.  */
    755   bfd_h_put_64 (abfd, r_vaddr, (bfd_byte *) ext.r_vaddr);
    756   bfd_h_put_32 (abfd, r_symndx, (bfd_byte *) ext.r_symndx);
     755  H_PUT_64 (abfd, r_vaddr, ext.r_vaddr);
     756  H_PUT_32 (abfd, r_symndx, ext.r_symndx);
    757757
    758758  BFD_ASSERT (bfd_little_endian (abfd));
     
    768768
    769769  /* Write out the relocation.  */
    770   if (bfd_write (&ext, sizeof ext, 1, abfd) != sizeof ext)
    771     return false;
    772 
    773   return true;
     770  if (bfd_bwrite (&ext, (bfd_size_type) sizeof ext, abfd) != sizeof ext)
     771    return FALSE;
     772
     773  return TRUE;
    774774}
    775775
     
    783783/* Set the section for a public symbol.  */
    784784
    785 static boolean
     785static bfd_boolean
    786786nlm_alpha_set_public_section (abfd, sym)
    787787     bfd *abfd;
     
    804804      BFD_ASSERT ((bfd_section_size (abfd, code_sec) & 0xf) == 0);
    805805    }
    806   return true;
     806  return TRUE;
    807807}
    808808
     
    820820/* Write an Alpha NLM external symbol.  */
    821821
    822 static boolean
     822static bfd_boolean
    823823nlm_alpha_write_external (abfd, count, sym, relocs)
    824824     bfd *abfd;
     
    827827     struct reloc_and_sec *relocs;
    828828{
    829   int i;
     829  bfd_size_type i;
    830830  bfd_byte len;
    831831  unsigned char temp[NLM_TARGET_LONG_SIZE];
     
    833833
    834834  len = strlen (sym->name);
    835   if ((bfd_write (&len, sizeof (bfd_byte), 1, abfd) != sizeof (bfd_byte))
    836       || bfd_write (sym->name, len, 1, abfd) != len)
    837     return false;
     835  if ((bfd_bwrite (&len, (bfd_size_type) sizeof (bfd_byte), abfd)
     836       != sizeof (bfd_byte))
     837      || bfd_bwrite (sym->name, (bfd_size_type) len, abfd) != len)
     838    return FALSE;
    838839
    839840  bfd_put_32 (abfd, count + 2, temp);
    840   if (bfd_write (temp, sizeof (temp), 1, abfd) != sizeof (temp))
    841     return false;
     841  if (bfd_bwrite (temp, (bfd_size_type) sizeof (temp), abfd) != sizeof (temp))
     842    return FALSE;
    842843
    843844  /* The first two relocs for each external symbol are the .lita
     
    848849  r.address = nlm_alpha_backend_data (abfd)->lita_address;
    849850  r.addend = nlm_alpha_backend_data (abfd)->lita_size + 1;
    850   if (nlm_alpha_write_import (abfd, (asection *) NULL, &r) == false)
    851     return false;
     851  if (! nlm_alpha_write_import (abfd, (asection *) NULL, &r))
     852    return FALSE;
    852853
    853854  r.address = nlm_alpha_backend_data (abfd)->gp;
    854855  r.addend = 0;
    855   if (nlm_alpha_write_import (abfd, (asection *) NULL, &r) == false)
    856     return false;
     856  if (! nlm_alpha_write_import (abfd, (asection *) NULL, &r))
     857    return FALSE;
    857858
    858859  for (i = 0; i < count; i++)
    859860    {
    860       if (nlm_alpha_write_import (abfd, relocs[i].sec,
    861                                   relocs[i].rel) == false)
    862         return false;
    863     }
    864 
    865   return true;
     861      if (! nlm_alpha_write_import (abfd, relocs[i].sec, relocs[i].rel))
     862        return FALSE;
     863    }
     864
     865  return TRUE;
    866866}
    867867
     
    875875  bfd_arch_alpha,
    876876  0,
    877   true, /* no uninitialized data permitted by Alpha NetWare.  */
     877  TRUE, /* no uninitialized data permitted by Alpha NetWare.  */
    878878  nlm_alpha_backend_object_p,
    879879  nlm_alpha_write_prefix,
Note: See TracChangeset for help on using the changeset viewer.