aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-02-07 01:26:56 +0000
committerAlan Modra <amodra@gmail.com>2008-02-07 01:26:56 +0000
commit2e444beaa07a2428b6409225840ce12d437d7805 (patch)
treeeae16a077740c853d2a59bab6f73c784756c958c /bfd
parent464f5c14b7ac1f27372383a886fc92632c4bac70 (diff)
downloadgdb-2e444beaa07a2428b6409225840ce12d437d7805.zip
gdb-2e444beaa07a2428b6409225840ce12d437d7805.tar.gz
gdb-2e444beaa07a2428b6409225840ce12d437d7805.tar.bz2
bfd/
* elf32-spu.c (spu_elf_size_stubs): Revert 2008-01-28 doubling of _ovly_buf_table size. (spu_elf_build_stubs): Use low bit of .size as "present" bit. Adjust initialisations relating to _ovly_buf_table. ld/ * emultempl/spu_ovl.S: Use low bit of _ovly_table.size as a "present" bit rather than low bit of .buf. Correct indexing into _ovly_buf_table. Use relative loads and stores to access overlay manager local vars. * emultempl/spu_ovl.o: Regenerate.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog7
-rw-r--r--bfd/elf32-spu.c12
2 files changed, 13 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6c9e799..6c11aec 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,10 @@
+2008-02-07 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-spu.c (spu_elf_size_stubs): Revert 2008-01-28 doubling
+ of _ovly_buf_table size.
+ (spu_elf_build_stubs): Use low bit of .size as "present" bit.
+ Adjust initialisations relating to _ovly_buf_table.
+
2008-02-04 Bob Wilson <bob.wilson@acm.org>
* elf32-xtensa (elf_xtensa_relocate_section): After finding an invalid
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c
index 04de774..826512f 100644
--- a/bfd/elf32-spu.c
+++ b/bfd/elf32-spu.c
@@ -1202,7 +1202,7 @@ spu_elf_size_stubs (bfd *output_bfd,
|| !bfd_set_section_alignment (ibfd, htab->ovtab, 4))
return 0;
- htab->ovtab->size = htab->num_overlays * 16 + 16 + htab->num_buf * 2 * 4;
+ htab->ovtab->size = htab->num_overlays * 16 + 16 + htab->num_buf * 4;
(*place_spu_section) (htab->ovtab, NULL, ".data");
htab->toe = bfd_make_section_anyway_with_flags (ibfd, ".toe", SEC_ALLOC);
@@ -1373,8 +1373,8 @@ spu_elf_build_stubs (struct bfd_link_info *info, int emit_syms)
/* Write out _ovly_table. */
p = htab->ovtab->contents;
- /* set low bit of .buf to mark non-overlay area as present. */
- p[15] = 1;
+ /* set low bit of .size to mark non-overlay area as present. */
+ p[7] = 1;
for (s = obfd->sections; s != NULL; s = s->next)
{
unsigned int ovl_index = spu_elf_section_data (s)->u.o.ovl_index;
@@ -1387,7 +1387,7 @@ spu_elf_build_stubs (struct bfd_link_info *info, int emit_syms)
bfd_put_32 (htab->ovtab->owner, s->vma, p + off);
bfd_put_32 (htab->ovtab->owner, (s->size + 15) & -16, p + off + 4);
/* file_off written later in spu_elf_modify_program_headers. */
- bfd_put_32 (htab->ovtab->owner, ovl_buf * 2, p + off + 12);
+ bfd_put_32 (htab->ovtab->owner, ovl_buf, p + off + 12);
}
}
@@ -1407,12 +1407,12 @@ spu_elf_build_stubs (struct bfd_link_info *info, int emit_syms)
if (h == NULL)
return FALSE;
h->root.u.def.value = htab->num_overlays * 16 + 16;
- h->size = htab->num_buf * 2 * 4;
+ h->size = htab->num_buf * 4;
h = define_ovtab_symbol (htab, "_ovly_buf_table_end");
if (h == NULL)
return FALSE;
- h->root.u.def.value = htab->num_overlays * 16 + 16 + htab->num_buf * 2 * 4;
+ h->root.u.def.value = htab->num_overlays * 16 + 16 + htab->num_buf * 4;
h->size = 0;
h = define_ovtab_symbol (htab, "_EAR_");