]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* ecoff.c: casting the return value of BFD_ALIGN to int
authorNick Clifton <nickc@redhat.com>
Wed, 24 Apr 2013 13:19:27 +0000 (13:19 +0000)
committerNick Clifton <nickc@redhat.com>
Wed, 24 Apr 2013 13:19:27 +0000 (13:19 +0000)
* elf32-tic6x.c: removing unused variables
* elf32-v850.c: redefine the type of a variable (int -> bfd_vma)
* vms-alpha.c: initialize a variable

bfd/ChangeLog
bfd/ecoff.c
bfd/elf32-tic6x.c
bfd/elf32-v850.c
bfd/elflink.c
bfd/vms-alpha.c

index 0c62889362bf7e5854d93b5703707c28bfb22a01..7322659d7577d624cf6742945330d6072ec96133 100644 (file)
@@ -1,3 +1,10 @@
+2013-04-19  Luca Pizzamiglio  <luca.pizzamiglio@gmail.com>
+
+       * ecoff.c: casting the return value of BFD_ALIGN to int
+       * elf32-tic6x.c: removing unused variables
+       * elf32-v850.c: redefine the type of a variable (int -> bfd_vma)
+       * vms-alpha.c: initialize a variable
+
 2013-04-22  Alan Modra  <amodra@gmail.com>
 
        PR ld/15382
index eaf8ada19dde971ee1223c8feff35b74aea90ae5..5add50cf506df56ecaa9e3272e18a7e2a7fff6d1 100644 (file)
@@ -1,7 +1,5 @@
 /* Generic ECOFF (Extended-COFF) routines.
-   Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
-   Free Software Foundation, Inc.
+   Copyright 1990-2013 Free Software Foundation, Inc.
    Original version by Per Bothner.
    Full support added by Ian Lance Taylor, ian@cygnus.com.
 
@@ -1888,7 +1886,7 @@ _bfd_ecoff_sizeof_headers (bfd *abfd,
   ret = (bfd_coff_filhsz (abfd)
         + bfd_coff_aoutsz (abfd)
         + c * bfd_coff_scnhsz (abfd));
-  return BFD_ALIGN (ret, 16);
+  return (int) BFD_ALIGN (ret, 16);
 }
 
 /* Get the contents of a section.  */
index 77c6ad1a85a4e51218909c38a6411965e3d150f9..7ac6325f68cdcdba4701e18c04625075b019dd0b 100644 (file)
@@ -3313,8 +3313,6 @@ elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
     {
       bfd_signed_vma *local_got;
       bfd_signed_vma *end_local_got;
-      char *local_tls_type;
-      bfd_vma *local_tlsdesc_gotent;
       bfd_size_type locsymcount;
       Elf_Internal_Shdr *symtab_hdr;
       asection *srel;
@@ -3355,8 +3353,7 @@ elf32_tic6x_size_dynamic_sections (bfd *output_bfd, struct bfd_link_info *info)
       end_local_got = local_got + locsymcount;
       s = htab->elf.sgot;
       srel = htab->elf.srelgot;
-      for (; local_got < end_local_got;
-          ++local_got, ++local_tls_type, ++local_tlsdesc_gotent)
+      for (; local_got < end_local_got; ++local_got)
        {
          if (*local_got > 0)
            {
index 7516ceb0a69fb6a492d8d37b05469ea71c9ac89e..89724adef9318b9107628540c66cc3c8a4693a2c 100644 (file)
@@ -3141,7 +3141,7 @@ v850_elf_relax_section (bfd *abfd,
 
          if (alignmoveto < alignto)
            {
-             unsigned int i;
+             bfd_vma i;
 
              align_pad_size = alignto - alignmoveto;
 #ifdef DEBUG_RELAX
index 99a1ddfa3d787f7b3e1ffddbdc4a159c3eb9affe..138c18ec90b73813b5a39ea3cdbdee0a188bbfef 100644 (file)
@@ -1,7 +1,5 @@
 /* ELF linking support for BFD.
-   Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-   2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
-   Free Software Foundation, Inc.
+   Copyright 1995-2013 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -11844,6 +11842,44 @@ _bfd_elf_gc_mark_extra_sections (struct bfd_link_info *info,
            && ((isec->flags & SEC_DEBUGGING) != 0
                || (isec->flags & (SEC_ALLOC | SEC_LOAD | SEC_RELOC)) == 0))
          isec->gc_mark = 1;
+      /* Look for CODE sections which are going to be discarded.  */
+      for (isec = ibfd->sections; isec != NULL; isec = isec->next)
+       if ((isec->flags & SEC_CODE) != 0
+           && isec->gc_mark == 0)
+         {
+           unsigned int ilen;
+           asection *dsec;
+
+           ilen = strlen (isec->name);
+
+           /* Determine if there are any debug sections associated
+              with this code section.  If so, remove their mark 
+              (which may have been set above) so that they can be
+              garbage collected as well.
+
+              Association is determined by the name of the debug section
+              containing the name of the code section as a suffix.  For
+              example .debug_line.text.foo is a debug section associated
+              with .text.foo.  */
+           for (dsec = ibfd->sections; dsec != NULL; dsec = dsec->next)
+             {
+               unsigned int dlen;
+
+               if (dsec->gc_mark == 0
+                   || (dsec->flags & SEC_DEBUGGING) == 0)
+                 continue;
+
+               dlen = strlen (dsec->name);
+
+               if (dlen > ilen
+                   && strncmp (dsec->name + (dlen - ilen),
+                               isec->name, ilen) == 0)
+                 {
+                   dsec->gc_mark = 0;
+                   break;
+                 }
+             }
+         }
     }
   return TRUE;
 }
index 4edc226702f667be837f6fdfcc14b20c49c8151e..2d757da074c9c770ad6658957561abef427b6274 100644 (file)
@@ -6043,7 +6043,7 @@ evax_bfd_print_etir (FILE *file, const char *name,
                      unsigned char *rec, unsigned int rec_len)
 {
   unsigned int off = sizeof (struct vms_egsd);
-  unsigned int sec_len;
+  unsigned int sec_len = 0;
 
   fprintf (file, _("  %s (len=%u+%u):\n"), name,
            (unsigned)(rec_len - sizeof (struct vms_eobjrec)),