forked from Imagelibrary/binutils-gdb
bfd/
* elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit. Add compact_stub. (emum _ovly_flavour): Delete ovly_compact, ovly_none. * elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and ovly_return fields with ovly_entry[2]. Adjust all users. (spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler when soft-icache. (spu_elf_build_stubs): Likewise. (ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for ovly_flavour changes. Update all callers. (ovl_stub_size_log2): New function. (build_stub): Handle compact icache stubs. Use different manager entry point for stubs in non-icache area. (spu_elf_size_stubs): Don't allocate space for indirect branch descriptors. (spu_elf_build_stubs): And don't built them. ld/ * emultempl/spu_icache.S: Add new entry to dummy handler. * emultempl/spu_icache.o_c: Regenerate. * emultempl/spuelf.em (params): Init new field. (no_overlays): New static var. (spu_before_allocation): Use it. (OPTION_SPU_COMPACT_STUBS): Define. (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add compact-stubs. (PARSE_AND_LIST_ARGS_CASES): Handle compact-stubs. Adjust no-overlays handling. ld/testsuite/ * ld-spu/icache1.d: Update for fixed set_id, new manager entry, and reduced data.
This commit is contained in:
@@ -1,3 +1,22 @@
|
|||||||
|
2009-03-17 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* elf32-spu.h (struct spu_elf_params): ovly_flavour now only 1 bit.
|
||||||
|
Add compact_stub.
|
||||||
|
(emum _ovly_flavour): Delete ovly_compact, ovly_none.
|
||||||
|
* elf32-spu.c (struct spu_link_hash_table): Replace ovly_load and
|
||||||
|
ovly_return fields with ovly_entry[2]. Adjust all users.
|
||||||
|
(spu_elf_find_overlays): Set ovly_entry[1] from __icache_call_handler
|
||||||
|
when soft-icache.
|
||||||
|
(spu_elf_build_stubs): Likewise.
|
||||||
|
(ovl_stub_size): Change arg to spu_elf_params pointer. Adjust for
|
||||||
|
ovly_flavour changes. Update all callers.
|
||||||
|
(ovl_stub_size_log2): New function.
|
||||||
|
(build_stub): Handle compact icache stubs. Use different manager
|
||||||
|
entry point for stubs in non-icache area.
|
||||||
|
(spu_elf_size_stubs): Don't allocate space for indirect branch
|
||||||
|
descriptors.
|
||||||
|
(spu_elf_build_stubs): And don't built them.
|
||||||
|
|
||||||
2009-03-16 Andrew Stubbs <ams@codesourcery.com>
|
2009-03-16 Andrew Stubbs <ams@codesourcery.com>
|
||||||
|
|
||||||
* dwarf2.c (read_section): Always use rawsize, if available.
|
* dwarf2.c (read_section): Always use rawsize, if available.
|
||||||
|
|||||||
231
bfd/elf32-spu.c
231
bfd/elf32-spu.c
@@ -311,9 +311,7 @@ struct spu_link_hash_table
|
|||||||
/* The stub section for each overlay section. */
|
/* The stub section for each overlay section. */
|
||||||
asection **stub_sec;
|
asection **stub_sec;
|
||||||
|
|
||||||
struct elf_link_hash_entry *ovly_load;
|
struct elf_link_hash_entry *ovly_entry[2];
|
||||||
struct elf_link_hash_entry *ovly_return;
|
|
||||||
unsigned long ovly_load_r_symndx;
|
|
||||||
|
|
||||||
/* Number of overlay buffers. */
|
/* Number of overlay buffers. */
|
||||||
unsigned int num_buf;
|
unsigned int num_buf;
|
||||||
@@ -773,10 +771,12 @@ spu_elf_find_overlays (struct bfd_link_info *info)
|
|||||||
ovly_mgr_entry = "__ovly_load";
|
ovly_mgr_entry = "__ovly_load";
|
||||||
if (htab->params->ovly_flavour == ovly_soft_icache)
|
if (htab->params->ovly_flavour == ovly_soft_icache)
|
||||||
ovly_mgr_entry = "__icache_br_handler";
|
ovly_mgr_entry = "__icache_br_handler";
|
||||||
htab->ovly_load = elf_link_hash_lookup (&htab->elf, ovly_mgr_entry,
|
htab->ovly_entry[0] = elf_link_hash_lookup (&htab->elf, ovly_mgr_entry,
|
||||||
FALSE, FALSE, FALSE);
|
FALSE, FALSE, FALSE);
|
||||||
if (htab->params->ovly_flavour != ovly_soft_icache)
|
ovly_mgr_entry = "__ovly_return";
|
||||||
htab->ovly_return = elf_link_hash_lookup (&htab->elf, "__ovly_return",
|
if (htab->params->ovly_flavour == ovly_soft_icache)
|
||||||
|
ovly_mgr_entry = "__icache_call_handler";
|
||||||
|
htab->ovly_entry[1] = elf_link_hash_lookup (&htab->elf, ovly_mgr_entry,
|
||||||
FALSE, FALSE, FALSE);
|
FALSE, FALSE, FALSE);
|
||||||
return ovl_index != 0;
|
return ovl_index != 0;
|
||||||
}
|
}
|
||||||
@@ -897,7 +897,7 @@ needs_ovl_stub (struct elf_link_hash_entry *h,
|
|||||||
if (h != NULL)
|
if (h != NULL)
|
||||||
{
|
{
|
||||||
/* Ensure no stubs for user supplied overlay manager syms. */
|
/* Ensure no stubs for user supplied overlay manager syms. */
|
||||||
if (h == htab->ovly_load || h == htab->ovly_return)
|
if (h == htab->ovly_entry[0]|| h == htab->ovly_entry[1])
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* setjmp always goes via an overlay stub, because then the return
|
/* setjmp always goes via an overlay stub, because then the return
|
||||||
@@ -1100,12 +1100,19 @@ count_stub (struct spu_link_hash_table *htab,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Support two sizes of overlay stubs, a slower more compact stub of two
|
/* Support two sizes of overlay stubs, a slower more compact stub of two
|
||||||
intructions, and a faster stub of four instructions. */
|
intructions, and a faster stub of four instructions.
|
||||||
|
Soft-icache stubs are four or eight words. */
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
ovl_stub_size (enum _ovly_flavour ovly_flavour)
|
ovl_stub_size (struct spu_elf_params *params)
|
||||||
{
|
{
|
||||||
return 8 << ovly_flavour;
|
return 16 << params->ovly_flavour >> params->compact_stub;
|
||||||
|
}
|
||||||
|
|
||||||
|
static unsigned int
|
||||||
|
ovl_stub_size_log2 (struct spu_elf_params *params)
|
||||||
|
{
|
||||||
|
return 4 + params->ovly_flavour - params->compact_stub;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Two instruction overlay stubs look like:
|
/* Two instruction overlay stubs look like:
|
||||||
@@ -1195,9 +1202,9 @@ build_stub (struct bfd_link_info *info,
|
|||||||
dest += dest_sec->output_offset + dest_sec->output_section->vma;
|
dest += dest_sec->output_offset + dest_sec->output_section->vma;
|
||||||
from = sec->size + sec->output_offset + sec->output_section->vma;
|
from = sec->size + sec->output_offset + sec->output_section->vma;
|
||||||
g->stub_addr = from;
|
g->stub_addr = from;
|
||||||
to = (htab->ovly_load->root.u.def.value
|
to = (htab->ovly_entry[0]->root.u.def.value
|
||||||
+ htab->ovly_load->root.u.def.section->output_offset
|
+ htab->ovly_entry[0]->root.u.def.section->output_offset
|
||||||
+ htab->ovly_load->root.u.def.section->output_section->vma);
|
+ htab->ovly_entry[0]->root.u.def.section->output_section->vma);
|
||||||
|
|
||||||
if (((dest | to | from) & 3) != 0)
|
if (((dest | to | from) & 3) != 0)
|
||||||
{
|
{
|
||||||
@@ -1206,9 +1213,9 @@ build_stub (struct bfd_link_info *info,
|
|||||||
}
|
}
|
||||||
dest_ovl = spu_elf_section_data (dest_sec->output_section)->u.o.ovl_index;
|
dest_ovl = spu_elf_section_data (dest_sec->output_section)->u.o.ovl_index;
|
||||||
|
|
||||||
switch (htab->params->ovly_flavour)
|
if (htab->params->ovly_flavour == ovly_normal
|
||||||
|
&& !htab->params->compact_stub)
|
||||||
{
|
{
|
||||||
case ovly_normal:
|
|
||||||
bfd_put_32 (sec->owner, ILA + ((dest_ovl << 7) & 0x01ffff80) + 78,
|
bfd_put_32 (sec->owner, ILA + ((dest_ovl << 7) & 0x01ffff80) + 78,
|
||||||
sec->contents + sec->size);
|
sec->contents + sec->size);
|
||||||
bfd_put_32 (sec->owner, LNOP,
|
bfd_put_32 (sec->owner, LNOP,
|
||||||
@@ -1221,9 +1228,10 @@ build_stub (struct bfd_link_info *info,
|
|||||||
else
|
else
|
||||||
bfd_put_32 (sec->owner, BRA + ((to << 5) & 0x007fff80),
|
bfd_put_32 (sec->owner, BRA + ((to << 5) & 0x007fff80),
|
||||||
sec->contents + sec->size + 12);
|
sec->contents + sec->size + 12);
|
||||||
break;
|
}
|
||||||
|
else if (htab->params->ovly_flavour == ovly_normal
|
||||||
case ovly_compact:
|
&& htab->params->compact_stub)
|
||||||
|
{
|
||||||
if (!BRA_STUBS)
|
if (!BRA_STUBS)
|
||||||
bfd_put_32 (sec->owner, BRSL + (((to - from) << 5) & 0x007fff80) + 75,
|
bfd_put_32 (sec->owner, BRSL + (((to - from) << 5) & 0x007fff80) + 75,
|
||||||
sec->contents + sec->size);
|
sec->contents + sec->size);
|
||||||
@@ -1232,9 +1240,9 @@ build_stub (struct bfd_link_info *info,
|
|||||||
sec->contents + sec->size);
|
sec->contents + sec->size);
|
||||||
bfd_put_32 (sec->owner, (dest & 0x3ffff) | (dest_ovl << 18),
|
bfd_put_32 (sec->owner, (dest & 0x3ffff) | (dest_ovl << 18),
|
||||||
sec->contents + sec->size + 4);
|
sec->contents + sec->size + 4);
|
||||||
break;
|
}
|
||||||
|
else if (htab->params->ovly_flavour == ovly_soft_icache)
|
||||||
case ovly_soft_icache:
|
{
|
||||||
lrlive = 0;
|
lrlive = 0;
|
||||||
if (stub_type == nonovl_stub)
|
if (stub_type == nonovl_stub)
|
||||||
;
|
;
|
||||||
@@ -1314,43 +1322,75 @@ build_stub (struct bfd_link_info *info,
|
|||||||
if (stub_type > br000_ovl_stub)
|
if (stub_type > br000_ovl_stub)
|
||||||
lrlive = stub_type - br000_ovl_stub;
|
lrlive = stub_type - br000_ovl_stub;
|
||||||
|
|
||||||
/* The branch that uses this stub goes to stub_addr + 12. We'll
|
if (ovl == 0)
|
||||||
set up an xor pattern that can be used by the icache manager
|
to = (htab->ovly_entry[1]->root.u.def.value
|
||||||
to modify this branch to go directly to its destination. */
|
+ htab->ovly_entry[1]->root.u.def.section->output_offset
|
||||||
g->stub_addr += 12;
|
+ htab->ovly_entry[1]->root.u.def.section->output_section->vma);
|
||||||
br_dest = g->stub_addr;
|
|
||||||
if (irela == NULL)
|
if (!htab->params->compact_stub)
|
||||||
{
|
{
|
||||||
/* Except in the case of _SPUEAR_ stubs, the branch in
|
/* The branch that uses this stub goes to stub_addr + 12. We'll
|
||||||
question is the one in the stub itself. */
|
set up an xor pattern that can be used by the icache manager
|
||||||
BFD_ASSERT (stub_type == nonovl_stub);
|
to modify this branch to go directly to its destination. */
|
||||||
g->br_addr = g->stub_addr;
|
g->stub_addr += 12;
|
||||||
br_dest = to;
|
br_dest = g->stub_addr;
|
||||||
|
if (irela == NULL)
|
||||||
|
{
|
||||||
|
/* Except in the case of _SPUEAR_ stubs, the branch in
|
||||||
|
question is the one in the stub itself. */
|
||||||
|
BFD_ASSERT (stub_type == nonovl_stub);
|
||||||
|
g->br_addr = g->stub_addr;
|
||||||
|
br_dest = to;
|
||||||
|
}
|
||||||
|
|
||||||
|
bfd_put_32 (sec->owner, dest_ovl - 1,
|
||||||
|
sec->contents + sec->size + 0);
|
||||||
|
set_id = ((dest_ovl - 1) >> htab->num_lines_log2) + 1;
|
||||||
|
bfd_put_32 (sec->owner, (set_id << 18) | (dest & 0x3ffff),
|
||||||
|
sec->contents + sec->size + 4);
|
||||||
|
bfd_put_32 (sec->owner, (lrlive << 29) | (g->br_addr & 0x3ffff),
|
||||||
|
sec->contents + sec->size + 8);
|
||||||
|
bfd_put_32 (sec->owner, BRASL + ((to << 5) & 0x007fff80) + 75,
|
||||||
|
sec->contents + sec->size + 12);
|
||||||
|
patt = dest ^ br_dest;
|
||||||
|
if (irela != NULL && ELF32_R_TYPE (irela->r_info) == R_SPU_REL16)
|
||||||
|
patt = (dest - g->br_addr) ^ (br_dest - g->br_addr);
|
||||||
|
bfd_put_32 (sec->owner, (patt << 5) & 0x007fff80,
|
||||||
|
sec->contents + sec->size + 16 + (g->br_addr & 0xf));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
g->stub_addr += 4;
|
||||||
|
br_dest = g->stub_addr;
|
||||||
|
if (irela == NULL)
|
||||||
|
{
|
||||||
|
BFD_ASSERT (stub_type == nonovl_stub);
|
||||||
|
g->br_addr = g->stub_addr;
|
||||||
|
br_dest = to;
|
||||||
|
}
|
||||||
|
|
||||||
|
set_id = ((dest_ovl - 1) >> htab->num_lines_log2) + 1;
|
||||||
|
bfd_put_32 (sec->owner, (set_id << 18) | (dest & 0x3ffff),
|
||||||
|
sec->contents + sec->size);
|
||||||
|
bfd_put_32 (sec->owner, BRASL + ((to << 5) & 0x007fff80) + 75,
|
||||||
|
sec->contents + sec->size + 4);
|
||||||
|
bfd_put_32 (sec->owner, (lrlive << 29) | (g->br_addr & 0x3ffff),
|
||||||
|
sec->contents + sec->size + 8);
|
||||||
|
patt = dest ^ br_dest;
|
||||||
|
if (irela != NULL && ELF32_R_TYPE (irela->r_info) == R_SPU_REL16)
|
||||||
|
patt = (dest - g->br_addr) ^ (br_dest - g->br_addr);
|
||||||
|
bfd_put_32 (sec->owner, (patt << 5) & 0x007fff80,
|
||||||
|
sec->contents + sec->size + 12);
|
||||||
}
|
}
|
||||||
|
|
||||||
bfd_put_32 (sec->owner, dest_ovl - 1,
|
|
||||||
sec->contents + sec->size + 0);
|
|
||||||
set_id = ((dest_ovl - 1) >> htab->num_lines_log2) + 1;
|
|
||||||
bfd_put_32 (sec->owner, (set_id << 18) | (dest & 0x3ffff),
|
|
||||||
sec->contents + sec->size + 4);
|
|
||||||
bfd_put_32 (sec->owner, (lrlive << 29) | (g->br_addr & 0x3ffff),
|
|
||||||
sec->contents + sec->size + 8);
|
|
||||||
bfd_put_32 (sec->owner, BRASL + ((to << 5) & 0x007fff80) + 75,
|
|
||||||
sec->contents + sec->size + 12);
|
|
||||||
patt = dest ^ br_dest;
|
|
||||||
if (irela != NULL && ELF32_R_TYPE (irela->r_info) == R_SPU_REL16)
|
|
||||||
patt = (dest - g->br_addr) ^ (br_dest - g->br_addr);
|
|
||||||
bfd_put_32 (sec->owner, (patt << 5) & 0x007fff80,
|
|
||||||
sec->contents + sec->size + 16 + (g->br_addr & 0xf));
|
|
||||||
if (ovl == 0)
|
if (ovl == 0)
|
||||||
/* Extra space for linked list entries. */
|
/* Extra space for linked list entries. */
|
||||||
sec->size += 16;
|
sec->size += 16;
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
abort ();
|
|
||||||
}
|
}
|
||||||
sec->size += ovl_stub_size (htab->params->ovly_flavour);
|
else
|
||||||
|
abort ();
|
||||||
|
|
||||||
|
sec->size += ovl_stub_size (htab->params);
|
||||||
|
|
||||||
if (htab->params->emit_stub_syms)
|
if (htab->params->emit_stub_syms)
|
||||||
{
|
{
|
||||||
@@ -1390,7 +1430,7 @@ build_stub (struct bfd_link_info *info,
|
|||||||
{
|
{
|
||||||
h->root.type = bfd_link_hash_defined;
|
h->root.type = bfd_link_hash_defined;
|
||||||
h->root.u.def.section = sec;
|
h->root.u.def.section = sec;
|
||||||
h->size = ovl_stub_size (htab->params->ovly_flavour);
|
h->size = ovl_stub_size (htab->params);
|
||||||
h->root.u.def.value = sec->size - h->size;
|
h->root.u.def.value = sec->size - h->size;
|
||||||
h->type = STT_FUNC;
|
h->type = STT_FUNC;
|
||||||
h->ref_regular = 1;
|
h->ref_regular = 1;
|
||||||
@@ -1587,7 +1627,8 @@ process_stubs (struct bfd_link_info *info, bfd_boolean build)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Allocate space for overlay call and return stubs. */
|
/* Allocate space for overlay call and return stubs.
|
||||||
|
Return 0 on error, 1 if no stubs, 2 otherwise. */
|
||||||
|
|
||||||
int
|
int
|
||||||
spu_elf_size_stubs (struct bfd_link_info *info)
|
spu_elf_size_stubs (struct bfd_link_info *info)
|
||||||
@@ -1623,9 +1664,9 @@ spu_elf_size_stubs (struct bfd_link_info *info)
|
|||||||
htab->stub_sec[0] = stub;
|
htab->stub_sec[0] = stub;
|
||||||
if (stub == NULL
|
if (stub == NULL
|
||||||
|| !bfd_set_section_alignment (ibfd, stub,
|
|| !bfd_set_section_alignment (ibfd, stub,
|
||||||
htab->params->ovly_flavour + 3))
|
ovl_stub_size_log2 (htab->params)))
|
||||||
return 0;
|
return 0;
|
||||||
stub->size = htab->stub_count[0] * ovl_stub_size (htab->params->ovly_flavour);
|
stub->size = htab->stub_count[0] * ovl_stub_size (htab->params);
|
||||||
if (htab->params->ovly_flavour == ovly_soft_icache)
|
if (htab->params->ovly_flavour == ovly_soft_icache)
|
||||||
/* Extra space for linked list entries. */
|
/* Extra space for linked list entries. */
|
||||||
stub->size += htab->stub_count[0] * 16;
|
stub->size += htab->stub_count[0] * 16;
|
||||||
@@ -1639,9 +1680,9 @@ spu_elf_size_stubs (struct bfd_link_info *info)
|
|||||||
htab->stub_sec[ovl] = stub;
|
htab->stub_sec[ovl] = stub;
|
||||||
if (stub == NULL
|
if (stub == NULL
|
||||||
|| !bfd_set_section_alignment (ibfd, stub,
|
|| !bfd_set_section_alignment (ibfd, stub,
|
||||||
htab->params->ovly_flavour + 3))
|
ovl_stub_size_log2 (htab->params)))
|
||||||
return 0;
|
return 0;
|
||||||
stub->size = htab->stub_count[ovl] * ovl_stub_size (htab->params->ovly_flavour);
|
stub->size = htab->stub_count[ovl] * ovl_stub_size (htab->params);
|
||||||
(*htab->params->place_spu_section) (stub, osec, NULL);
|
(*htab->params->place_spu_section) (stub, osec, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1656,11 +1697,9 @@ spu_elf_size_stubs (struct bfd_link_info *info)
|
|||||||
{
|
{
|
||||||
/* Space for icache manager tables.
|
/* Space for icache manager tables.
|
||||||
a) Tag array, one quadword per cache line.
|
a) Tag array, one quadword per cache line.
|
||||||
b) Linked list elements, max_branch per line quadwords.
|
b) Linked list elements, max_branch per line quadwords. */
|
||||||
c) Indirect branch descriptors, 8 quadwords. */
|
htab->ovtab->size = 16 * ((1 + htab->params->max_branch)
|
||||||
htab->ovtab->size = 16 * (((1 + htab->params->max_branch)
|
<< htab->num_lines_log2);
|
||||||
<< htab->num_lines_log2)
|
|
||||||
+ 8);
|
|
||||||
|
|
||||||
htab->init = bfd_make_section_anyway_with_flags (ibfd, ".ovini", flags);
|
htab->init = bfd_make_section_anyway_with_flags (ibfd, ".ovini", flags);
|
||||||
if (htab->init == NULL
|
if (htab->init == NULL
|
||||||
@@ -1824,7 +1863,7 @@ spu_elf_build_stubs (struct bfd_link_info *info)
|
|||||||
htab->stub_sec[i]->size = 0;
|
htab->stub_sec[i]->size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
h = htab->ovly_load;
|
h = htab->ovly_entry[0];
|
||||||
if (h == NULL)
|
if (h == NULL)
|
||||||
{
|
{
|
||||||
const char *ovly_mgr_entry = "__ovly_load";
|
const char *ovly_mgr_entry = "__ovly_load";
|
||||||
@@ -1833,7 +1872,7 @@ spu_elf_build_stubs (struct bfd_link_info *info)
|
|||||||
ovly_mgr_entry = "__icache_br_handler";
|
ovly_mgr_entry = "__icache_br_handler";
|
||||||
h = elf_link_hash_lookup (&htab->elf, ovly_mgr_entry,
|
h = elf_link_hash_lookup (&htab->elf, ovly_mgr_entry,
|
||||||
FALSE, FALSE, FALSE);
|
FALSE, FALSE, FALSE);
|
||||||
htab->ovly_load = h;
|
htab->ovly_entry[0] = h;
|
||||||
}
|
}
|
||||||
BFD_ASSERT (h != NULL
|
BFD_ASSERT (h != NULL
|
||||||
&& (h->root.type == bfd_link_hash_defined
|
&& (h->root.type == bfd_link_hash_defined
|
||||||
@@ -1849,12 +1888,29 @@ spu_elf_build_stubs (struct bfd_link_info *info)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
h = htab->ovly_return;
|
h = htab->ovly_entry[1];
|
||||||
if (h == NULL && htab->params->ovly_flavour != ovly_soft_icache)
|
if (h == NULL)
|
||||||
{
|
{
|
||||||
h = elf_link_hash_lookup (&htab->elf, "__ovly_return",
|
const char *ovly_mgr_entry = "__ovly_return";
|
||||||
|
|
||||||
|
if (htab->params->ovly_flavour == ovly_soft_icache)
|
||||||
|
ovly_mgr_entry = "__icache_call_handler";
|
||||||
|
h = elf_link_hash_lookup (&htab->elf, ovly_mgr_entry,
|
||||||
FALSE, FALSE, FALSE);
|
FALSE, FALSE, FALSE);
|
||||||
htab->ovly_return = h;
|
htab->ovly_entry[1] = h;
|
||||||
|
}
|
||||||
|
BFD_ASSERT (h != NULL
|
||||||
|
&& (h->root.type == bfd_link_hash_defined
|
||||||
|
|| h->root.type == bfd_link_hash_defweak)
|
||||||
|
&& h->def_regular);
|
||||||
|
|
||||||
|
s = h->root.u.def.section->output_section;
|
||||||
|
if (spu_elf_section_data (s)->u.o.ovl_index)
|
||||||
|
{
|
||||||
|
(*_bfd_error_handler) (_("%s in overlay section"),
|
||||||
|
h->root.root.string);
|
||||||
|
bfd_set_error (bfd_error_bad_value);
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fill in all the stubs. */
|
/* Fill in all the stubs. */
|
||||||
@@ -1890,9 +1946,7 @@ spu_elf_build_stubs (struct bfd_link_info *info)
|
|||||||
p = htab->ovtab->contents;
|
p = htab->ovtab->contents;
|
||||||
if (htab->params->ovly_flavour == ovly_soft_icache)
|
if (htab->params->ovly_flavour == ovly_soft_icache)
|
||||||
{
|
{
|
||||||
#define BI_HANDLER "__icache_ptr_handler0"
|
bfd_vma off, icache_base, linklist;
|
||||||
char name[sizeof (BI_HANDLER)];
|
|
||||||
bfd_vma off, icache_base, linklist, bihand;
|
|
||||||
|
|
||||||
h = define_ovtab_symbol (htab, "__icache_tagbase");
|
h = define_ovtab_symbol (htab, "__icache_tagbase");
|
||||||
if (h == NULL)
|
if (h == NULL)
|
||||||
@@ -1927,31 +1981,6 @@ spu_elf_build_stubs (struct bfd_link_info *info)
|
|||||||
off += h->size;
|
off += h->size;
|
||||||
p += h->size;
|
p += h->size;
|
||||||
|
|
||||||
h = elf_link_hash_lookup (&htab->elf, "__icache_bi_handler",
|
|
||||||
FALSE, FALSE, FALSE);
|
|
||||||
bihand = 0;
|
|
||||||
if (h != NULL
|
|
||||||
&& (h->root.type == bfd_link_hash_defined
|
|
||||||
|| h->root.type == bfd_link_hash_defweak)
|
|
||||||
&& h->def_regular)
|
|
||||||
bihand = (h->root.u.def.value
|
|
||||||
+ h->root.u.def.section->output_offset
|
|
||||||
+ h->root.u.def.section->output_section->vma);
|
|
||||||
memcpy (name, BI_HANDLER, sizeof (BI_HANDLER));
|
|
||||||
for (i = 0; i < 8; i++)
|
|
||||||
{
|
|
||||||
name[sizeof (BI_HANDLER) - 2] = '0' + i;
|
|
||||||
h = define_ovtab_symbol (htab, name);
|
|
||||||
if (h == NULL)
|
|
||||||
return FALSE;
|
|
||||||
h->root.u.def.value = off;
|
|
||||||
h->size = 16;
|
|
||||||
bfd_put_32 (htab->ovtab->owner, bihand, p);
|
|
||||||
bfd_put_32 (htab->ovtab->owner, i << 28, p + 8);
|
|
||||||
p += 16;
|
|
||||||
off += 16;
|
|
||||||
}
|
|
||||||
|
|
||||||
h = define_ovtab_symbol (htab, "__icache_base");
|
h = define_ovtab_symbol (htab, "__icache_base");
|
||||||
if (h == NULL)
|
if (h == NULL)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -3652,7 +3681,7 @@ auto_ovl_lib_functions (struct bfd_link_info *info, unsigned int lib_size)
|
|||||||
if (p->fun == call->fun)
|
if (p->fun == call->fun)
|
||||||
break;
|
break;
|
||||||
if (!p)
|
if (!p)
|
||||||
stub_size += ovl_stub_size (htab->params->ovly_flavour);
|
stub_size += ovl_stub_size (htab->params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tmp + stub_size < lib_size)
|
if (tmp + stub_size < lib_size)
|
||||||
@@ -3670,7 +3699,7 @@ auto_ovl_lib_functions (struct bfd_link_info *info, unsigned int lib_size)
|
|||||||
while ((p = *pp) != NULL)
|
while ((p = *pp) != NULL)
|
||||||
if (!p->fun->sec->linker_mark)
|
if (!p->fun->sec->linker_mark)
|
||||||
{
|
{
|
||||||
lib_size += ovl_stub_size (htab->params->ovly_flavour);
|
lib_size += ovl_stub_size (htab->params);
|
||||||
*pp = p->next;
|
*pp = p->next;
|
||||||
free (p);
|
free (p);
|
||||||
}
|
}
|
||||||
@@ -4200,7 +4229,7 @@ spu_elf_auto_overlay (struct bfd_link_info *info)
|
|||||||
free (bfd_arr);
|
free (bfd_arr);
|
||||||
|
|
||||||
fixed_size += htab->reserved;
|
fixed_size += htab->reserved;
|
||||||
fixed_size += htab->non_ovly_stub * ovl_stub_size (htab->params->ovly_flavour);
|
fixed_size += htab->non_ovly_stub * ovl_stub_size (htab->params);
|
||||||
if (fixed_size + mos_param.max_overlay_size <= htab->local_store)
|
if (fixed_size + mos_param.max_overlay_size <= htab->local_store)
|
||||||
{
|
{
|
||||||
if (htab->params->ovly_flavour == ovly_soft_icache)
|
if (htab->params->ovly_flavour == ovly_soft_icache)
|
||||||
@@ -4362,7 +4391,7 @@ spu_elf_auto_overlay (struct bfd_link_info *info)
|
|||||||
if (htab->params->ovly_flavour == ovly_soft_icache
|
if (htab->params->ovly_flavour == ovly_soft_icache
|
||||||
&& num_stubs > htab->params->max_branch)
|
&& num_stubs > htab->params->max_branch)
|
||||||
break;
|
break;
|
||||||
if (tmp + num_stubs * ovl_stub_size (htab->params->ovly_flavour)
|
if (tmp + num_stubs * ovl_stub_size (htab->params)
|
||||||
> overlay_size)
|
> overlay_size)
|
||||||
break;
|
break;
|
||||||
size = tmp;
|
size = tmp;
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ struct spu_elf_params
|
|||||||
#define OVERLAY_RODATA 4
|
#define OVERLAY_RODATA 4
|
||||||
|
|
||||||
/* Type of overlays, enum _ovly_flavour. */
|
/* Type of overlays, enum _ovly_flavour. */
|
||||||
unsigned int ovly_flavour : 2;
|
unsigned int ovly_flavour : 1;
|
||||||
|
unsigned int compact_stub : 1;
|
||||||
|
|
||||||
/* Set if we should emit symbols for stubs. */
|
/* Set if we should emit symbols for stubs. */
|
||||||
unsigned int emit_stub_syms : 1;
|
unsigned int emit_stub_syms : 1;
|
||||||
@@ -98,10 +99,8 @@ struct _spu_elf_section_data
|
|||||||
|
|
||||||
enum _ovly_flavour
|
enum _ovly_flavour
|
||||||
{
|
{
|
||||||
ovly_compact,
|
|
||||||
ovly_normal,
|
ovly_normal,
|
||||||
ovly_soft_icache,
|
ovly_soft_icache
|
||||||
ovly_none
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _ovl_stream
|
struct _ovl_stream
|
||||||
|
|||||||
12
ld/ChangeLog
12
ld/ChangeLog
@@ -1,3 +1,15 @@
|
|||||||
|
2009-03-17 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* emultempl/spu_icache.S: Add new entry to dummy handler.
|
||||||
|
* emultempl/spu_icache.o_c: Regenerate.
|
||||||
|
* emultempl/spuelf.em (params): Init new field.
|
||||||
|
(no_overlays): New static var.
|
||||||
|
(spu_before_allocation): Use it.
|
||||||
|
(OPTION_SPU_COMPACT_STUBS): Define.
|
||||||
|
(PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add compact-stubs.
|
||||||
|
(PARSE_AND_LIST_ARGS_CASES): Handle compact-stubs. Adjust no-overlays
|
||||||
|
handling.
|
||||||
|
|
||||||
2009-03-17 Alan Modra <amodra@bigpond.net.au>
|
2009-03-17 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* configure.host (HOSTING_LIBS): Two dollars on shell variable
|
* configure.host (HOSTING_LIBS): Two dollars on shell variable
|
||||||
|
|||||||
@@ -2,3 +2,6 @@
|
|||||||
.global __icache_br_handler
|
.global __icache_br_handler
|
||||||
__icache_br_handler:
|
__icache_br_handler:
|
||||||
stop
|
stop
|
||||||
|
.global __icache_call_handler
|
||||||
|
__icache_call_handler:
|
||||||
|
stop
|
||||||
|
|||||||
@@ -1,31 +1,33 @@
|
|||||||
0x7f,0x45,0x4c,0x46,0x01,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
0x7f,0x45,0x4c,0x46,0x01,0x02,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
0x00,0x01,0x00,0x17,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
0x00,0x01,0x00,0x17,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x00,0x00,0x28,
|
0x00,0x00,0x00,0x68,0x00,0x00,0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x00,0x00,0x28,
|
||||||
0x00,0x07,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x2e,0x73,0x79,0x6d,0x74,0x61,0x62,
|
0x00,0x07,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x2e,0x73,0x79,
|
||||||
0x00,0x2e,0x73,0x74,0x72,0x74,0x61,0x62,0x00,0x2e,0x73,0x68,0x73,0x74,0x72,0x74,
|
0x6d,0x74,0x61,0x62,0x00,0x2e,0x73,0x74,0x72,0x74,0x61,0x62,0x00,0x2e,0x73,0x68,
|
||||||
0x61,0x62,0x00,0x2e,0x74,0x65,0x78,0x74,0x00,0x2e,0x64,0x61,0x74,0x61,0x00,0x2e,
|
0x73,0x74,0x72,0x74,0x61,0x62,0x00,0x2e,0x74,0x65,0x78,0x74,0x00,0x2e,0x64,0x61,
|
||||||
0x62,0x73,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
0x74,0x61,0x00,0x2e,0x62,0x73,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1b,
|
|
||||||
0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x34,
|
|
||||||
0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
|
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x03,
|
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x27,
|
|
||||||
0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,
|
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
|
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,
|
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x00,
|
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
|
|
||||||
0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x7c,
|
|
||||||
0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,
|
|
||||||
0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,
|
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xcc,0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x00,
|
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x1b,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
|
0x00,0x00,0x00,0x34,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x03,0x00,0x00,0x00,0x01,
|
0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0x00,0x00,0x00,0x01,
|
||||||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x01,0x00,0x5f,0x5f,0x69,
|
0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,
|
||||||
0x63,0x61,0x63,0x68,0x65,0x5f,0x62,0x72,0x5f,0x68,0x61,0x6e,0x64,0x6c,0x65,0x72,
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
|
||||||
0x00,
|
0x00,0x00,0x00,0x27,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,
|
||||||
|
0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
|
0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x11,0x00,0x00,0x00,0x03,
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x00,0x00,0x00,0x2c,
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
|
||||||
|
0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
|
0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x60,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x04,
|
||||||
|
0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x03,
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xe0,0x00,0x00,0x00,0x2b,
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x01,
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x02,
|
||||||
|
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x03,
|
||||||
|
0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x01,
|
||||||
|
0x00,0x00,0x00,0x15,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x01,
|
||||||
|
0x00,0x5f,0x5f,0x69,0x63,0x61,0x63,0x68,0x65,0x5f,0x62,0x72,0x5f,0x68,0x61,0x6e,
|
||||||
|
0x64,0x6c,0x65,0x72,0x00,0x5f,0x5f,0x69,0x63,0x61,0x63,0x68,0x65,0x5f,0x63,0x61,
|
||||||
|
0x6c,0x6c,0x5f,0x68,0x61,0x6e,0x64,0x6c,0x65,0x72,0x00,
|
||||||
|
|||||||
@@ -37,11 +37,12 @@ static struct spu_elf_params params =
|
|||||||
&spu_elf_load_ovl_mgr,
|
&spu_elf_load_ovl_mgr,
|
||||||
&spu_elf_open_overlay_script,
|
&spu_elf_open_overlay_script,
|
||||||
&spu_elf_relink,
|
&spu_elf_relink,
|
||||||
0, ovly_normal, 0, 0, 0, 0, 0, 0,
|
0, ovly_normal, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0, 0x3ffff,
|
0, 0x3ffff,
|
||||||
1, 0, 16, 0, 0, 2000
|
1, 0, 16, 0, 0, 2000
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static unsigned int no_overlays = 0;
|
||||||
static unsigned int num_lines_set = 0;
|
static unsigned int num_lines_set = 0;
|
||||||
static unsigned int line_size_set = 0;
|
static unsigned int line_size_set = 0;
|
||||||
static char *auto_overlay_file = 0;
|
static char *auto_overlay_file = 0;
|
||||||
@@ -263,7 +264,7 @@ spu_before_allocation (void)
|
|||||||
{
|
{
|
||||||
if (is_spu_target ()
|
if (is_spu_target ()
|
||||||
&& !link_info.relocatable
|
&& !link_info.relocatable
|
||||||
&& params.ovly_flavour != ovly_none)
|
&& !no_overlays)
|
||||||
{
|
{
|
||||||
/* Size the sections. This is premature, but we need to know the
|
/* Size the sections. This is premature, but we need to know the
|
||||||
rough layout so that overlays can be found. */
|
rough layout so that overlays can be found. */
|
||||||
@@ -584,7 +585,8 @@ fi
|
|||||||
PARSE_AND_LIST_PROLOGUE='
|
PARSE_AND_LIST_PROLOGUE='
|
||||||
#define OPTION_SPU_PLUGIN 301
|
#define OPTION_SPU_PLUGIN 301
|
||||||
#define OPTION_SPU_NO_OVERLAYS (OPTION_SPU_PLUGIN + 1)
|
#define OPTION_SPU_NO_OVERLAYS (OPTION_SPU_PLUGIN + 1)
|
||||||
#define OPTION_SPU_STUB_SYMS (OPTION_SPU_NO_OVERLAYS + 1)
|
#define OPTION_SPU_COMPACT_STUBS (OPTION_SPU_NO_OVERLAYS + 1)
|
||||||
|
#define OPTION_SPU_STUB_SYMS (OPTION_SPU_COMPACT_STUBS + 1)
|
||||||
#define OPTION_SPU_NON_OVERLAY_STUBS (OPTION_SPU_STUB_SYMS + 1)
|
#define OPTION_SPU_NON_OVERLAY_STUBS (OPTION_SPU_STUB_SYMS + 1)
|
||||||
#define OPTION_SPU_LOCAL_STORE (OPTION_SPU_NON_OVERLAY_STUBS + 1)
|
#define OPTION_SPU_LOCAL_STORE (OPTION_SPU_NON_OVERLAY_STUBS + 1)
|
||||||
#define OPTION_SPU_STACK_ANALYSIS (OPTION_SPU_LOCAL_STORE + 1)
|
#define OPTION_SPU_STACK_ANALYSIS (OPTION_SPU_LOCAL_STORE + 1)
|
||||||
@@ -611,6 +613,7 @@ PARSE_AND_LIST_LONGOPTS='
|
|||||||
{ "line-size", required_argument, NULL, OPTION_SPU_LINE_SIZE },
|
{ "line-size", required_argument, NULL, OPTION_SPU_LINE_SIZE },
|
||||||
{ "non-ia-text", no_argument, NULL, OPTION_SPU_NON_IA_TEXT },
|
{ "non-ia-text", no_argument, NULL, OPTION_SPU_NON_IA_TEXT },
|
||||||
{ "no-overlays", no_argument, NULL, OPTION_SPU_NO_OVERLAYS },
|
{ "no-overlays", no_argument, NULL, OPTION_SPU_NO_OVERLAYS },
|
||||||
|
{ "compact-stubs", no_argument, NULL, OPTION_SPU_COMPACT_STUBS },
|
||||||
{ "emit-stub-syms", no_argument, NULL, OPTION_SPU_STUB_SYMS },
|
{ "emit-stub-syms", no_argument, NULL, OPTION_SPU_STUB_SYMS },
|
||||||
{ "extra-overlay-stubs", no_argument, NULL, OPTION_SPU_NON_OVERLAY_STUBS },
|
{ "extra-overlay-stubs", no_argument, NULL, OPTION_SPU_NON_OVERLAY_STUBS },
|
||||||
{ "local-store", required_argument, NULL, OPTION_SPU_LOCAL_STORE },
|
{ "local-store", required_argument, NULL, OPTION_SPU_LOCAL_STORE },
|
||||||
@@ -631,6 +634,7 @@ PARSE_AND_LIST_OPTIONS='
|
|||||||
fprintf (file, _("\
|
fprintf (file, _("\
|
||||||
--plugin Make SPU plugin.\n\
|
--plugin Make SPU plugin.\n\
|
||||||
--no-overlays No overlay handling.\n\
|
--no-overlays No overlay handling.\n\
|
||||||
|
--compact-stubs Use smaller and possibly slower call stubs.\n\
|
||||||
--emit-stub-syms Add symbols on overlay call stubs.\n\
|
--emit-stub-syms Add symbols on overlay call stubs.\n\
|
||||||
--extra-overlay-stubs Add stubs on all calls out of overlay regions.\n\
|
--extra-overlay-stubs Add stubs on all calls out of overlay regions.\n\
|
||||||
--local-store=lo:hi Valid address range.\n\
|
--local-store=lo:hi Valid address range.\n\
|
||||||
@@ -662,7 +666,11 @@ PARSE_AND_LIST_ARGS_CASES='
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case OPTION_SPU_NO_OVERLAYS:
|
case OPTION_SPU_NO_OVERLAYS:
|
||||||
params.ovly_flavour = ovly_none;
|
no_overlays = 1;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OPTION_SPU_COMPACT_STUBS:
|
||||||
|
params.compact_stub = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case OPTION_SPU_STUB_SYMS:
|
case OPTION_SPU_STUB_SYMS:
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
2009-03-17 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
|
* ld-spu/icache1.d: Update for fixed set_id, new manager entry, and
|
||||||
|
reduced data.
|
||||||
|
|
||||||
2009-03-17 Alan Modra <amodra@bigpond.net.au>
|
2009-03-17 Alan Modra <amodra@bigpond.net.au>
|
||||||
|
|
||||||
* config/default.exp (get_link_files): Replace double dollars with
|
* config/default.exp (get_link_files): Replace double dollars with
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
Disassembly of section .ovl.init:
|
Disassembly of section .ovl.init:
|
||||||
00000800 <__icache_fileoff>:
|
00000800 <__icache_fileoff>:
|
||||||
.* 00 00 00 00.*
|
.* 00 00 00 00.*
|
||||||
.* 00 00 07 80.*
|
.* 00 00 07 00.*
|
||||||
\.\.\.
|
\.\.\.
|
||||||
|
|
||||||
Disassembly of section \.ovly1:
|
Disassembly of section \.ovly1:
|
||||||
@@ -32,19 +32,19 @@ Disassembly of section \.ovly2:
|
|||||||
.* 32 00 16 80 br fec .*
|
.* 32 00 16 80 br fec .*
|
||||||
\.\.\.
|
\.\.\.
|
||||||
fa0: 00 00 00 02.*
|
fa0: 00 00 00 02.*
|
||||||
fa4: 00 00 11 04.*
|
fa4: 00 04 11 04.*
|
||||||
fa8: a0 00 0c 10.*
|
fa8: a0 00 0c 10.*
|
||||||
fac: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
fac: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
||||||
fb0: 00 00 ed 00.*
|
fb0: 00 00 ed 00.*
|
||||||
\.\.\.
|
\.\.\.
|
||||||
fc0: 00 00 00 02.*
|
fc0: 00 00 00 02.*
|
||||||
fc4: 00 00 10 00.*
|
fc4: 00 04 10 00.*
|
||||||
fc8: a0 00 0c 14.*
|
fc8: a0 00 0c 14.*
|
||||||
fcc: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
fcc: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
||||||
fd0: 00 00 00 00.*
|
fd0: 00 00 00 00.*
|
||||||
fd4: 00 00 0a 80.*
|
fd4: 00 00 0a 80.*
|
||||||
\.\.\.
|
\.\.\.
|
||||||
fe4: 00 00 08 00.*
|
fe4: 00 04 08 00.*
|
||||||
fe8: 20 00 0f 38.*
|
fe8: 20 00 0f 38.*
|
||||||
fec: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
fec: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
||||||
\.\.\.
|
\.\.\.
|
||||||
@@ -89,7 +89,7 @@ Disassembly of section \.ovly5:
|
|||||||
.* 30 01 7d 80 bra bec .*
|
.* 30 01 7d 80 bra bec .*
|
||||||
\.\.\.
|
\.\.\.
|
||||||
be0: 00 00 00 03.*
|
be0: 00 00 00 03.*
|
||||||
be4: 00 00 14 00.*
|
be4: 00 04 14 00.*
|
||||||
be8: a0 00 0b 2c.*
|
be8: a0 00 0b 2c.*
|
||||||
bec: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
bec: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
||||||
\.\.\.
|
\.\.\.
|
||||||
@@ -104,20 +104,20 @@ Disassembly of section \.ovly6:
|
|||||||
.* 32 00 18 80 br fec .*
|
.* 32 00 18 80 br fec .*
|
||||||
\.\.\.
|
\.\.\.
|
||||||
fa0: 00 00 00 07.*
|
fa0: 00 00 00 07.*
|
||||||
fa4: 00 04 14 00.*
|
fa4: 00 08 14 00.*
|
||||||
fa8: a0 00 0c 00.*
|
fa8: a0 00 0c 00.*
|
||||||
fac: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
fac: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
||||||
fb0: 00 03 75 80.*
|
fb0: 00 03 75 80.*
|
||||||
\.\.\.
|
\.\.\.
|
||||||
fc0: 00 00 00 07.*
|
fc0: 00 00 00 07.*
|
||||||
fc4: 00 04 14 00.*
|
fc4: 00 08 14 00.*
|
||||||
fc8: a0 00 0c 04.*
|
fc8: a0 00 0c 04.*
|
||||||
fcc: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
fcc: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
||||||
fd0: 00 00 00 00.*
|
fd0: 00 00 00 00.*
|
||||||
fd4: 00 00 86 80.*
|
fd4: 00 00 86 80.*
|
||||||
\.\.\.
|
\.\.\.
|
||||||
fe0: 00 00 00 04.*
|
fe0: 00 00 00 04.*
|
||||||
fe4: 00 04 08 00.*
|
fe4: 00 08 08 00.*
|
||||||
fe8: 20 00 0f 28.*
|
fe8: 20 00 0f 28.*
|
||||||
fec: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
fec: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
||||||
\.\.\.
|
\.\.\.
|
||||||
@@ -140,20 +140,20 @@ Disassembly of section \.ovly7:
|
|||||||
.* 32 00 15 00 br 13ec .*
|
.* 32 00 15 00 br 13ec .*
|
||||||
\.\.\.
|
\.\.\.
|
||||||
13a0: 00 00 00 03.*
|
13a0: 00 00 00 03.*
|
||||||
13a4: 00 00 14 00.*
|
13a4: 00 04 14 00.*
|
||||||
13a8: a0 00 10 18.*
|
13a8: a0 00 10 18.*
|
||||||
13ac: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
13ac: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
||||||
\.\.\.
|
\.\.\.
|
||||||
13b8: 00 00 0f 80.*
|
13b8: 00 00 0f 80.*
|
||||||
13bc: 00 00 00 00.*
|
13bc: 00 00 00 00.*
|
||||||
13c0: 00 00 00 07.*
|
13c0: 00 00 00 07.*
|
||||||
13c4: 00 04 14 00.*
|
13c4: 00 08 14 00.*
|
||||||
13c8: a0 00 10 1c.*
|
13c8: a0 00 10 1c.*
|
||||||
13cc: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
13cc: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
||||||
\.\.\.
|
\.\.\.
|
||||||
13dc: 00 00 0a 80.*
|
13dc: 00 00 0a 80.*
|
||||||
13e0: 00 00 00 05.*
|
13e0: 00 00 00 05.*
|
||||||
13e4: 00 04 0c 00.*
|
13e4: 00 08 0c 00.*
|
||||||
13e8: 20 00 13 44.*
|
13e8: 20 00 13 44.*
|
||||||
13ec: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
13ec: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
||||||
13f0: 00 00 00 00.*
|
13f0: 00 00 00 00.*
|
||||||
@@ -171,13 +171,13 @@ Disassembly of section \.ovly8:
|
|||||||
.* 32 00 17 80 br 17ec .*
|
.* 32 00 17 80 br 17ec .*
|
||||||
\.\.\.
|
\.\.\.
|
||||||
17c0: 00 00 00 02.*
|
17c0: 00 00 00 02.*
|
||||||
17c4: 00 00 11 04.*
|
17c4: 00 04 11 04.*
|
||||||
17c8: a0 00 14 0c.*
|
17c8: a0 00 14 0c.*
|
||||||
17cc: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
17cc: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
||||||
\.\.\.
|
\.\.\.
|
||||||
17dc: 00 00 d9 00.*
|
17dc: 00 00 d9 00.*
|
||||||
17e0: 00 00 00 06.*
|
17e0: 00 00 00 06.*
|
||||||
17e4: 00 04 10 00.*
|
17e4: 00 08 10 00.*
|
||||||
17e8: 20 00 17 30.*
|
17e8: 20 00 17 30.*
|
||||||
17ec: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
17ec: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
||||||
17f0: 00 7f 0d 80.*
|
17f0: 00 7f 0d 80.*
|
||||||
@@ -186,14 +186,14 @@ Disassembly of section \.ovly8:
|
|||||||
Disassembly of section \.text:
|
Disassembly of section \.text:
|
||||||
|
|
||||||
00001800 <_start>:
|
00001800 <_start>:
|
||||||
.* 41 00 00 03 ilhu \$3,0
|
.* 41 00 02 03 ilhu \$3,4
|
||||||
.* 60 8a 00 03 iohl \$3,5120 # 1400
|
.* 60 8a 00 03 iohl \$3,5120 # 1400
|
||||||
.* 32 00 04 80 br 182c.*
|
.* 32 00 04 80 br 182c.*
|
||||||
\.\.\.
|
\.\.\.
|
||||||
1820: 00 00 00 01.*
|
1820: 00 00 00 01.*
|
||||||
1824: 00 00 0c 00.*
|
1824: 00 04 0c 00.*
|
||||||
1828: a0 00 18 08.*
|
1828: a0 00 18 08.*
|
||||||
182c: 31 03 0a 4b brasl \$75,1850 <__icache_br_handler>
|
182c: 31 03 0a cb brasl \$75,1854 <__icache_call_handler>
|
||||||
\.\.\.
|
\.\.\.
|
||||||
1838: 00 7e 7b 80.*
|
1838: 00 7e 7b 80.*
|
||||||
\.\.\.
|
\.\.\.
|
||||||
|
|||||||
Reference in New Issue
Block a user