This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[commit] SPU i-cache: Fix size of .toe section
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: binutils at sourceware dot org
- Date: Thu, 14 May 2009 19:58:57 +0200 (CEST)
- Subject: [commit] SPU i-cache: Fix size of .toe section
Hello,
the SPU linker is currently allocating a 128-byte .toe section when
using the software i-cache, apparently with the intention to use this
as the manager's IA->EA translation table. That doesn't really work,
as the .toe already has an ABI-defined semantics which is different.
In particular, when using the standalone loader, only a .toe containing
a single entry (_EAR_) is supported. The following patch changes the
toe size back to 16. (The manager then needs to allocate its 128-byte
structure on its own.)
Tested on spu-elf with no regressions.
Approved off-line by Alan Modra; committed to mainline.
Bye,
Ulrich
ChangeLog:
* elf32-spu.c (spu_elf_size_stubs): Even in software i-cache mode,
generate only a 16-byte .toe section.
(spu_elf_build_stubs, spu_elf_auto_overlay): Likewise.
diff -urNp src.orig/bfd/elf32-spu.c src/bfd/elf32-spu.c
--- src.orig/bfd/elf32-spu.c 2009-05-11 16:08:53.000000000 +0200
+++ src/bfd/elf32-spu.c 2009-05-11 16:09:56.000000000 +0200
@@ -1750,7 +1750,7 @@ spu_elf_size_stubs (struct bfd_link_info
if (htab->toe == NULL
|| !bfd_set_section_alignment (ibfd, htab->toe, 4))
return 0;
- htab->toe->size = htab->params->ovly_flavour == ovly_soft_icache ? 256 : 16;
+ htab->toe->size = 16;
return 2;
}
@@ -2080,7 +2080,7 @@ spu_elf_build_stubs (struct bfd_link_inf
return FALSE;
h->root.u.def.section = htab->toe;
h->root.u.def.value = 0;
- h->size = htab->params->ovly_flavour == ovly_soft_icache ? 16 * 16 : 16;
+ h->size = 16;
return TRUE;
}
@@ -4264,8 +4264,8 @@ spu_elf_auto_overlay (struct bfd_link_in
fixed_size += htab->params->max_branch << (htab->num_lines_log2 + 4);
/* c) Indirect branch descriptors, 8 quadwords. */
fixed_size += 8 * 16;
- /* d) Pointers to __ea backing store, 16 quadwords. */
- fixed_size += 16 * 16;
+ /* d) Pointer to __ea backing store (toe), 1 quadword. */
+ fixed_size += 16;
}
else
{
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com