This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
SPU soft-icache changes
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: binutils at sourceware dot org
- Date: Wed, 4 Feb 2009 13:12:38 +1030
- Subject: SPU soft-icache changes
A few small soft-icache related fixes.
bfd/
* elf32-spu.c (spu_elf_build_stubs): Define __icache_neg_log2_linesize.
Define __icache_ptr_handler*, not __icache_ptr___icache_bi_handler*.
ld/
* emultempl/spuelf.em (spu_after_open): Don't combine .text.ia.*
during relocatable link.
Index: bfd/elf32-spu.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-spu.c,v
retrieving revision 1.62
diff -u -p -r1.62 elf32-spu.c
--- bfd/elf32-spu.c 21 Jan 2009 02:27:12 -0000 1.62
+++ bfd/elf32-spu.c 4 Feb 2009 02:24:35 -0000
@@ -1886,7 +1886,7 @@ spu_elf_build_stubs (struct bfd_link_inf
p = htab->ovtab->contents;
if (htab->params->ovly_flavour == ovly_soft_icache)
{
-#define BI_HANDLER "__icache_ptr___icache_bi_handler0"
+#define BI_HANDLER "__icache_ptr_handler0"
char name[sizeof (BI_HANDLER)];
bfd_vma off, icache_base, linklist, bihand;
@@ -1955,6 +1955,12 @@ spu_elf_build_stubs (struct bfd_link_inf
h->root.u.def.section = bfd_abs_section_ptr;
h->size = htab->num_buf << htab->line_size_log2;
+ h = define_ovtab_symbol (htab, "__icache_neg_log2_linesize");
+ if (h == NULL)
+ return FALSE;
+ h->root.u.def.value = -htab->line_size_log2;
+ h->root.u.def.section = bfd_abs_section_ptr;
+
if (htab->init != NULL && htab->init->size != 0)
{
htab->init->contents = bfd_zalloc (htab->init->owner,
Index: ld/emultempl/spuelf.em
===================================================================
RCS file: /cvs/src/src/ld/emultempl/spuelf.em,v
retrieving revision 1.32
diff -u -p -r1.32 spuelf.em
--- ld/emultempl/spuelf.em 21 Jan 2009 02:27:13 -0000 1.32
+++ ld/emultempl/spuelf.em 4 Feb 2009 02:24:48 -0000
@@ -106,6 +106,9 @@ spu_after_open (void)
params.emit_stub_syms |= link_info.emitrelocations;
spu_elf_setup (&link_info, ¶ms);
+ if (link_info.relocatable)
+ lang_add_unique (".text.ia.*");
+
if (!link_info.relocatable
&& link_info.input_bfds != NULL
&& !spu_elf_create_sections (&link_info))
--
Alan Modra
Australia Development Lab, IBM