]> git.pld-linux.org Git - packages/crossavr32-binutils.git/commitdiff
- from
authorbszx <bszx@pld-linux.org>
Mon, 23 Jul 2007 20:12:06 +0000 (20:12 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
http://www.avr32linux.org/twiki/bin/viewfile/Main/DevelopmentTools?rev=1;filename=501-avr32-sreldyn-fix.patch.gz

Changed files:
    crossavr32-binutils-sreldyn-fix.patch -> 1.1

crossavr32-binutils-sreldyn-fix.patch [new file with mode: 0644]

diff --git a/crossavr32-binutils-sreldyn-fix.patch b/crossavr32-binutils-sreldyn-fix.patch
new file mode 100644 (file)
index 0000000..4331cb0
--- /dev/null
@@ -0,0 +1,103 @@
+Index: binutils/bfd/elf32-avr32.c
+===================================================================
+--- binutils/bfd/elf32-avr32.c (revision 8769)
++++ binutils/bfd/elf32-avr32.c (working copy)
+@@ -298,7 +298,7 @@
+   /* Shortcuts to get to dynamic linker sections.  */
+   asection *sgot;
+   asection *srelgot;
+-  asection *sreldyn;
++  /* asection *sreldyn; */
+   asection *sstub;
+   /* We use a variation of Pigeonhole Sort to sort the GOT.  After the
+@@ -506,14 +506,14 @@
+   if (!avr32_elf_create_got_section (dynobj, info))
+     return FALSE;
+-  if (!htab->sreldyn)
++  /* if (!htab->sreldyn)
+     htab->sreldyn = create_dynamic_section(dynobj, ".rela.dyn",
+-                                         flags | SEC_READONLY, 2);
++                                         flags | SEC_READONLY, 2); */
+   if (!htab->sstub)
+     htab->sstub = create_dynamic_section(dynobj, ".stub",
+                                        flags | SEC_READONLY | SEC_CODE, 2);
+-  if (!htab->sreldyn || !htab->sstub)
++  if (/* !htab->sreldyn || */ !htab->sstub)
+     return FALSE;
+   return TRUE;
+@@ -669,12 +669,12 @@
+         if ((info->shared || h != NULL)
+             && (sec->flags & SEC_ALLOC))
+           {
+-            if (htab->sreldyn == NULL)
++            if (htab->srelgot == NULL)
+               {
+-                htab->sreldyn = create_dynamic_section(dynobj, ".rela.dyn",
++                htab->srelgot = create_dynamic_section(dynobj, ".rela.got",
+                                                        bed->dynamic_sec_flags
+                                                        | SEC_READONLY, 2);
+-                if (htab->sreldyn == NULL)
++                if (htab->srelgot == NULL)
+                   return FALSE;
+               }
+@@ -1062,7 +1062,7 @@
+     {
+       pr_debug("Allocating %d dynamic reloc against symbol %s...\n",
+              havr->possibly_dynamic_relocs, h->root.root.string);
+-      htab->sreldyn->size += (havr->possibly_dynamic_relocs
++      htab->srelgot->size += (havr->possibly_dynamic_relocs
+                             * sizeof(Elf32_External_Rela));
+     }
+@@ -1156,7 +1156,7 @@
+   /* Allocate space for local sym dynamic relocs */
+   BFD_ASSERT(htab->local_dynamic_relocs == 0 || info->shared);
+   if (htab->local_dynamic_relocs)
+-    htab->sreldyn->size += (htab->local_dynamic_relocs
++    htab->srelgot->size += (htab->local_dynamic_relocs
+                           * sizeof(Elf32_External_Rela));
+   /* We now have determined the sizes of the various dynamic
+@@ -3191,7 +3191,6 @@
+   struct got_entry **local_got_ents;
+   asection *sgot;
+   asection *srelgot;
+-  asection *sreldyn;
+   pr_debug("(6) relocate section %s:<%s> (size 0x%lx)\n",
+          input_bfd->filename, input_section->name, input_section->size);
+@@ -3207,7 +3206,6 @@
+   local_got_ents = elf_local_got_ents(input_bfd);
+   sgot = htab->sgot;
+   srelgot = htab->srelgot;
+-  sreldyn = htab->sreldyn;
+   relend = relocs + input_section->reloc_count;
+   for (rel = relocs; rel < relend; rel++)
+@@ -3444,15 +3442,15 @@
+                   }
+               }
+-            pr_debug("sreldyn reloc_count: %d, size %lu\n",
+-                     sreldyn->reloc_count, sreldyn->size);
++            pr_debug("srelgot reloc_count: %d, size %lu\n",
++                     srelgot->reloc_count, srelgot->size);
+-            loc = sreldyn->contents;
+-            loc += sreldyn->reloc_count++ * sizeof(Elf32_External_Rela);
++            loc = srelgot->contents;
++            loc += srelgot->reloc_count++ * sizeof(Elf32_External_Rela);
+             bfd_elf32_swap_reloca_out(output_bfd, &outrel, loc);
+-            BFD_ASSERT(sreldyn->reloc_count * sizeof(Elf32_External_Rela)
+-                       <= sreldyn->size);
++            BFD_ASSERT(srelgot->reloc_count * sizeof(Elf32_External_Rela)
++                       <= srelgot->size);
+             if (!relocate)
+               continue;
This page took 0.088214 seconds and 4 git commands to generate.