2012-02-24 Luis Machado <lgustavo@codesourcery>
[deliverable/binutils-gdb.git] / bfd / elfnn-ia64.c
index bc31fca790362f6763573e03b85648410f4a1dc6..d70b28e9d33fc2ba15de5f9663ef8c62f9904e1f 100644 (file)
@@ -2129,7 +2129,7 @@ count_dyn_reloc (bfd *abfd, struct elfNN_ia64_dyn_sym_info *dyn_i,
       rent->count = 0;
       dyn_i->reloc_entries = rent;
     }
-  rent->reltext |= reltext;
+  rent->reltext = reltext;
   rent->count++;
 
   return TRUE;
@@ -5036,18 +5036,27 @@ elfNN_vms_object_p (bfd *abfd)
          flagword flags;
          char *nname = NULL;
 
-         /* Find a section covering base_vma.  */
+         /* Find a section covering [base_vma;limit_vma)  */
          for (sec = abfd->sections; sec != NULL; sec = sec->next)
            {
-             if ((sec->flags & (SEC_ALLOC | SEC_LOAD)) == 0)
+             /* Skip uninteresting sections (either not in memory or
+                below base_vma.  */
+             if ((sec->flags & (SEC_ALLOC | SEC_LOAD)) == 0
+                 || sec->vma + sec->size <= base_vma)
                continue;
-             if (sec->vma <= base_vma && sec->vma + sec->size > base_vma)
+             if (sec->vma <= base_vma)
                {
+                 /* This section covers (maybe partially) the beginning
+                    of the range.  */
                  base_vma = sec->vma + sec->size;
                  goto again;
                }
-             if (sec->vma < next_vma && sec->vma + sec->size >= base_vma)
-               next_vma = sec->vma;
+             if (sec->vma < next_vma)
+               {
+                 /* This section partially covers the end of the range.
+                    Used to compute the size of the hole.  */
+                 next_vma = sec->vma;
+               }
            }
 
          /* No section covering [base_vma; next_vma).  Create a fake one.  */
This page took 0.025261 seconds and 4 git commands to generate.