2007-05-04 H.J. Lu <hongjiu.lu@intel.com>
authorH.J. Lu <hjl.tools@gmail.com>
Fri, 4 May 2007 21:53:02 +0000 (21:53 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Fri, 4 May 2007 21:53:02 +0000 (21:53 +0000)
* elflink.c (elf_link_sort_relocs): Return if both .rela.dyn
and .rel.dyn aren't present.

bfd/ChangeLog
bfd/elflink.c

index f4eec5cdcbca0bc7def00890e2f682939b1a6619..d136f6c35d627c036a0a0389ad0591ebd1a4a0aa 100644 (file)
@@ -1,3 +1,8 @@
+2007-05-04  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * elflink.c (elf_link_sort_relocs): Return if both .rela.dyn
+       and .rel.dyn aren't present.
+
 2007-05-04  Nick Clifton  <nickc@redhat.com>
 
        * elflink.c (elf_link_sort_relocs): If both .rela.dyn and .rel.dyn
index 0e1dc6eab7213520a4795300e928cecb225ec280..b58cfa6485c069ca5f675cc73fedcc82cdd43dc1 100644 (file)
@@ -7221,8 +7221,8 @@ static size_t
 elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
 {
   asection *dynamic_relocs;
-  asection * rela_dyn;
-  asection * rel_dyn;
+  asection *rela_dyn;
+  asection *rel_dyn;
   bfd_size_type count, size;
   size_t i, ret, sort_elt, ext_size;
   bfd_byte *sort, *s_non_relative, *p;
@@ -7361,10 +7361,12 @@ elf_link_sort_relocs (bfd *abfd, struct bfd_link_info *info, asection **psec)
        /* Make a guess.  */
        use_rela = TRUE;
     }
-  else if (rela_dyn == NULL || rela_dyn->size == 0)
+  else if (rela_dyn != NULL && rela_dyn->size > 0)
+    use_rela = TRUE;
+  else if (rel_dyn != NULL && rel_dyn->size > 0)
     use_rela = FALSE;
   else
-    use_rela = TRUE;
+    return 0;
 
   if (use_rela)
     {
This page took 0.048019 seconds and 4 git commands to generate.