* elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
authorAlan Modra <amodra@gmail.com>
Mon, 11 May 2009 09:40:52 +0000 (09:40 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 11 May 2009 09:40:52 +0000 (09:40 +0000)
start of overlays.
(spu_elf_build_stubs): Don't define __icache_tagbase.  Define
__icache_tag_array and __icache_tag_array_size.

bfd/ChangeLog
bfd/elf32-spu.c

index 5e2b41146c7238fe0fe91b6ad7133f824b814f82..2e0759a2d7514987682628160f1f5a0cb5dc9be5 100644 (file)
@@ -1,3 +1,10 @@
+2009-05-11  Ulrich Weigand  <uweigand@de.ibm.com>
+
+       * elf32-spu.c (spu_elf_find_overlays): Don't use .ovl.init lma as
+       start of overlays.
+       (spu_elf_build_stubs): Don't define __icache_tagbase.  Define
+       __icache_tag_array and __icache_tag_array_size.
+
 2009-05-11  Masaki Muranaka  <monaka@monami-software.com>
 
        * elf32-bfin.c (bfin_bfd_reloc_type_lookup): Remove unnecessary
index b6952a190272329dbff87fa539aeb9144205f813..fab3139f2e0569df37e7d2229fb5c958e06a212d 100644 (file)
@@ -657,7 +657,10 @@ spu_elf_find_overlays (struct bfd_link_info *info)
            {
              asection *s0 = alloc_sec[i - 1];
              vma_start = s0->vma;
-             lma_start = s0->lma;
+             if (strncmp (s0->name, ".ovl.init", 9) != 0)
+               lma_start = s0->lma;
+             else
+               lma_start = s->lma;
              ovl_end = (s0->vma
                         + ((bfd_vma) 1
                            << (htab->num_lines_log2 + htab->line_size_log2)));
@@ -1938,12 +1941,19 @@ spu_elf_build_stubs (struct bfd_link_info *info)
     {
       bfd_vma off, icache_base, linklist;
 
-      h = define_ovtab_symbol (htab, "__icache_tagbase");
+      h = define_ovtab_symbol (htab, "__icache_tag_array");
       if (h == NULL)
        return FALSE;
       h->root.u.def.value = 0;
       h->size = 16 << htab->num_lines_log2;
       off = h->size;
+
+      h = define_ovtab_symbol (htab, "__icache_tag_array_size");
+      if (h == NULL)
+       return FALSE;
+      h->root.u.def.value = 16 << htab->num_lines_log2;
+      h->root.u.def.section = bfd_abs_section_ptr;
+
       icache_base = htab->ovl_sec[0]->vma;
       linklist = (htab->ovtab->output_section->vma
                  + htab->ovtab->output_offset