aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-08-02 06:44:43 +0000
committerAlan Modra <amodra@gmail.com>2008-08-02 06:44:43 +0000
commit4f0d75bedd07c4ed50a022d6df3d21a288e98a63 (patch)
tree01acaa14fc7618cbce29ef1b9b07dc4694b3fd37
parent9b4e57660d385d9135549aeb8360ebfa14fb3990 (diff)
downloadgdb-4f0d75bedd07c4ed50a022d6df3d21a288e98a63.zip
gdb-4f0d75bedd07c4ed50a022d6df3d21a288e98a63.tar.gz
gdb-4f0d75bedd07c4ed50a022d6df3d21a288e98a63.tar.bz2
* elf32-spu.c (mark_overlay_section): Move code calculating
max_overlay_size to correct block. (spu_elf_auto_overlay): Don't use %x in einfo error message.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf32-spu.c21
2 files changed, 18 insertions, 9 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 54da63c..fe5a8b9 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-02 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-spu.c (mark_overlay_section): Move code calculating
+ max_overlay_size to correct block.
+ (spu_elf_auto_overlay): Don't use %x in einfo error message.
+
2008-08-01 Alan Modra <amodra@bigpond.net.au>
Jan Kratochvil <jan.kratochvil@redhat.com>
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c
index 71fa925..3a5728b 100644
--- a/bfd/elf32-spu.c
+++ b/bfd/elf32-spu.c
@@ -2807,6 +2807,8 @@ mark_overlay_section (struct function_info *fun,
fun->visit4 = TRUE;
if (!fun->sec->linker_mark)
{
+ unsigned int size;
+
fun->sec->linker_mark = 1;
fun->sec->gc_mark = 1;
fun->sec->segment_mark = 0;
@@ -2814,10 +2816,10 @@ mark_overlay_section (struct function_info *fun,
be!), and SEC_CODE is clear on rodata sections. We use
this flag to differentiate the two overlay section types. */
fun->sec->flags |= SEC_CODE;
+
if (spu_hash_table (info)->auto_overlay & OVERLAY_RODATA)
{
char *name = NULL;
- unsigned int size;
/* Find the rodata section corresponding to this function's
text section. */
@@ -2872,12 +2874,12 @@ mark_overlay_section (struct function_info *fun,
}
free (name);
}
- size = fun->sec->size;
- if (fun->rodata)
- size += fun->rodata->size;
- if (mos_param->max_overlay_size < size)
- mos_param->max_overlay_size = size;
}
+ size = fun->sec->size;
+ if (fun->rodata)
+ size += fun->rodata->size;
+ if (mos_param->max_overlay_size < size)
+ mos_param->max_overlay_size = size;
}
for (count = 0, call = fun->call_list; call != NULL; call = call->next)
@@ -3600,9 +3602,10 @@ spu_elf_auto_overlay (struct bfd_link_info *info,
}
if (fixed_size + mos_param.max_overlay_size > htab->local_store)
- info->callbacks->einfo (_("non-overlay plus maximum overlay size "
- "of 0x%x exceeds local store\n"),
- fixed_size + mos_param.max_overlay_size);
+ info->callbacks->einfo (_("non-overlay size of 0x%v plus maximum overlay "
+ "size of 0x%v exceeds local store\n"),
+ (bfd_vma) fixed_size,
+ (bfd_vma) mos_param.max_overlay_size);
/* Now see if we should put some functions in the non-overlay area. */
if (fixed_size < htab->overlay_fixed