aboutsummaryrefslogtreecommitdiff
path: root/ld/emultempl
diff options
context:
space:
mode:
authorTrevor Smigiel <Trevor_Smigiel@playstation.sony.com>2009-08-05 20:40:34 +0000
committerTrevor Smigiel <Trevor_Smigiel@playstation.sony.com>2009-08-05 20:40:34 +0000
commit9cc305ec2050ff3cda567d40cf87a2814d8d2ff3 (patch)
treed6ac66ada9f1a228988e8beb6030f1b673d5e413 /ld/emultempl
parent99e008fef7268b84c5122b8a49ca7aa25edd7282 (diff)
downloadgdb-9cc305ec2050ff3cda567d40cf87a2814d8d2ff3.zip
gdb-9cc305ec2050ff3cda567d40cf87a2814d8d2ff3.tar.gz
gdb-9cc305ec2050ff3cda567d40cf87a2814d8d2ff3.tar.bz2
bfd/
* elf32-spu.h (spu_elf_params): Add member emit_fixups. (spu_elf_size_sections): Declare prototype. * elf32-spu.c (spu_link_hash_table): Add member sfixup. (FIXUP_RECORD_SIZE, FIXUP_GET, FIXUP_PUT): New macros. (spu_elf_emit_fixup): New function. (spu_elf_relocate_section): Emit fixup for each SPU_ADDR32. (spu_elf_size_sections): New function. ld/ * emulparams/elf32_spu.sh (OTHER_READONLY_SECTIONS): Add .fixup section and __fixup_start symbol. * emultempl/spuelf.em (params): Initialize emit_fixups member. (spu_before_allocation): Call spu_elf_size_sections. (OPTION_SPU_EMIT_FIXUPS): Define. (PARSE_AND_LIST_LONGOPTS): Add --emit-fixups. (PARSE_AND_LIST_ARGS_CASES): Handle --emit-fixups. * ld.texinfo (--emit-fixups): Document. ld/testsuite/ * ld-spu/fixup.d: New. * ld-spu/fixup.s: New.
Diffstat (limited to 'ld/emultempl')
-rw-r--r--ld/emultempl/spuelf.em12
1 files changed, 11 insertions, 1 deletions
diff --git a/ld/emultempl/spuelf.em b/ld/emultempl/spuelf.em
index 1b549ad..1f4fbec 100644
--- a/ld/emultempl/spuelf.em
+++ b/ld/emultempl/spuelf.em
@@ -37,7 +37,7 @@ static struct spu_elf_params params =
&spu_elf_load_ovl_mgr,
&spu_elf_open_overlay_script,
&spu_elf_relink,
- 0, ovly_normal, 0, 0, 0, 0, 0, 0, 0,
+ 0, ovly_normal, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0x3ffff,
1, 0, 16, 0, 0, 2000
};
@@ -316,6 +316,10 @@ spu_before_allocation (void)
lang_reset_memory_regions ();
}
+ if (is_spu_target ()
+ && !link_info.relocatable)
+ spu_elf_size_sections (link_info.output_bfd, &link_info);
+
gld${EMULATION_NAME}_before_allocation ();
}
@@ -600,6 +604,7 @@ PARSE_AND_LIST_PROLOGUE='
#define OPTION_SPU_RESERVED_SPACE (OPTION_SPU_FIXED_SPACE + 1)
#define OPTION_SPU_EXTRA_STACK (OPTION_SPU_RESERVED_SPACE + 1)
#define OPTION_SPU_NO_AUTO_OVERLAY (OPTION_SPU_EXTRA_STACK + 1)
+#define OPTION_SPU_EMIT_FIXUPS (OPTION_SPU_NO_AUTO_OVERLAY + 1)
'
PARSE_AND_LIST_LONGOPTS='
@@ -625,6 +630,7 @@ PARSE_AND_LIST_LONGOPTS='
{ "reserved-space", required_argument, NULL, OPTION_SPU_RESERVED_SPACE },
{ "extra-stack-space", required_argument, NULL, OPTION_SPU_EXTRA_STACK },
{ "no-auto-overlay", optional_argument, NULL, OPTION_SPU_NO_AUTO_OVERLAY },
+ { "emit-fixups", optional_argument, NULL, OPTION_SPU_EMIT_FIXUPS },
'
PARSE_AND_LIST_OPTIONS='
@@ -812,6 +818,10 @@ PARSE_AND_LIST_ARGS_CASES='
break;
}
break;
+
+ case OPTION_SPU_EMIT_FIXUPS:
+ params.emit_fixups = 1;
+ break;
'
LDEMUL_AFTER_OPEN=spu_after_open