1 Index: binutils/bfd/elf32-avr32.c
2 ===================================================================
3 --- binutils/bfd/elf32-avr32.c (revision 8769)
4 +++ binutils/bfd/elf32-avr32.c (working copy)
6 /* Shortcuts to get to dynamic linker sections. */
10 + /* asection *sreldyn; */
13 /* We use a variation of Pigeonhole Sort to sort the GOT. After the
15 if (!avr32_elf_create_got_section (dynobj, info))
19 + /* if (!htab->sreldyn)
20 htab->sreldyn = create_dynamic_section(dynobj, ".rela.dyn",
21 - flags | SEC_READONLY, 2);
22 + flags | SEC_READONLY, 2); */
24 htab->sstub = create_dynamic_section(dynobj, ".stub",
25 flags | SEC_READONLY | SEC_CODE, 2);
27 - if (!htab->sreldyn || !htab->sstub)
28 + if (/* !htab->sreldyn || */ !htab->sstub)
33 if ((info->shared || h != NULL)
34 && (sec->flags & SEC_ALLOC))
36 - if (htab->sreldyn == NULL)
37 + if (htab->srelgot == NULL)
39 - htab->sreldyn = create_dynamic_section(dynobj, ".rela.dyn",
40 + htab->srelgot = create_dynamic_section(dynobj, ".rela.got",
41 bed->dynamic_sec_flags
43 - if (htab->sreldyn == NULL)
44 + if (htab->srelgot == NULL)
50 pr_debug("Allocating %d dynamic reloc against symbol %s...\n",
51 havr->possibly_dynamic_relocs, h->root.root.string);
52 - htab->sreldyn->size += (havr->possibly_dynamic_relocs
53 + htab->srelgot->size += (havr->possibly_dynamic_relocs
54 * sizeof(Elf32_External_Rela));
58 /* Allocate space for local sym dynamic relocs */
59 BFD_ASSERT(htab->local_dynamic_relocs == 0 || info->shared);
60 if (htab->local_dynamic_relocs)
61 - htab->sreldyn->size += (htab->local_dynamic_relocs
62 + htab->srelgot->size += (htab->local_dynamic_relocs
63 * sizeof(Elf32_External_Rela));
65 /* We now have determined the sizes of the various dynamic
67 struct got_entry **local_got_ents;
72 pr_debug("(6) relocate section %s:<%s> (size 0x%lx)\n",
73 input_bfd->filename, input_section->name, input_section->size);
75 local_got_ents = elf_local_got_ents(input_bfd);
77 srelgot = htab->srelgot;
78 - sreldyn = htab->sreldyn;
80 relend = relocs + input_section->reloc_count;
81 for (rel = relocs; rel < relend; rel++)
82 @@ -3444,15 +3442,15 @@
86 - pr_debug("sreldyn reloc_count: %d, size %lu\n",
87 - sreldyn->reloc_count, sreldyn->size);
88 + pr_debug("srelgot reloc_count: %d, size %lu\n",
89 + srelgot->reloc_count, srelgot->size);
91 - loc = sreldyn->contents;
92 - loc += sreldyn->reloc_count++ * sizeof(Elf32_External_Rela);
93 + loc = srelgot->contents;
94 + loc += srelgot->reloc_count++ * sizeof(Elf32_External_Rela);
95 bfd_elf32_swap_reloca_out(output_bfd, &outrel, loc);
97 - BFD_ASSERT(sreldyn->reloc_count * sizeof(Elf32_External_Rela)
99 + BFD_ASSERT(srelgot->reloc_count * sizeof(Elf32_External_Rela)