Tidy up formatting in bfd-in2.h
[deliverable/binutils-gdb.git] / bfd / elf32-avr.c
index 55ea2c6f870cb0363c4ba8029a1f5e488539a983..61f28e6d4e2270a9e1424eaf7e9909bc2503bdc9 100644 (file)
@@ -1,5 +1,5 @@
 /* AVR-specific support for 32-bit ELF
-   Copyright 1999, 2000 Free Software Foundation, Inc.
+   Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
    Contributed by Denis Chertykov <denisc@overta.ru>
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -427,14 +427,9 @@ elf32_avr_gc_mark_hook (abfd, info, rel, h, sym)
     }
   else
     {
-      if (!(elf_bad_symtab (abfd)
-           && ELF_ST_BIND (sym->st_info) != STB_LOCAL)
-         && !((sym->st_shndx <= 0 || sym->st_shndx >= SHN_LORESERVE)
-              && sym->st_shndx != SHN_COMMON))
-       {
-         return bfd_section_from_elf_index (abfd, sym->st_shndx);
-       }
+      return bfd_section_from_elf_index (abfd, sym->st_shndx);
     }
+
   return NULL;
 }
 
@@ -699,7 +694,7 @@ avr_final_link_relocate (howto, input_bfd, input_section,
       x = bfd_get_16 (input_bfd, contents);
       x |= ((srel & 0x10000) | ((srel << 3) & 0x1f00000)) >> 16;
       bfd_put_16 (input_bfd, x, contents);
-      bfd_put_16 (input_bfd, srel & 0xffff, contents+2);
+      bfd_put_16 (input_bfd, (bfd_vma) srel & 0xffff, contents+2);
       break;
 
     default:
@@ -778,9 +773,7 @@ elf32_avr_relocate_section (output_bfd, info, input_bfd, input_section,
        {
          sym = local_syms + r_symndx;
          sec = local_sections [r_symndx];
-         relocation = (sec->output_section->vma
-                       + sec->output_offset
-                       + sym->st_value);
+         relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
 
          name = bfd_elf_string_from_elf_section
            (input_bfd, symtab_hdr->sh_link, sym->st_name);
@@ -913,7 +906,7 @@ static boolean
 elf32_avr_object_p (abfd)
      bfd *abfd;
 {
-  int e_set = bfd_mach_avr2;
+  unsigned int e_set = bfd_mach_avr2;
   if (elf_elfheader (abfd)->e_machine == EM_AVR
       || elf_elfheader (abfd)->e_machine == EM_AVR_OLD)
     {
This page took 0.024809 seconds and 4 git commands to generate.