aboutsummaryrefslogtreecommitdiff
path: root/ld
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2008-12-10 13:36:41 +0000
committerAlan Modra <amodra@gmail.com>2008-12-10 13:36:41 +0000
commita3a219a90a59440cb2a29cee2a4cde87c6bfaf19 (patch)
tree8afbe6fe3f12036869cbccde54e6a15af4d072c3 /ld
parent64615358cc3bf603ff78364451421139343e2dc8 (diff)
downloadgdb-a3a219a90a59440cb2a29cee2a4cde87c6bfaf19.zip
gdb-a3a219a90a59440cb2a29cee2a4cde87c6bfaf19.tar.gz
gdb-a3a219a90a59440cb2a29cee2a4cde87c6bfaf19.tar.bz2
bfd/
* elf32-spu.h (struct spu_elf_params): Add num_regions. * elf32-spu.c (spu_elf_auto_overlay): Handle multiple overlay regions. ld/ * emultempl/spuelf.em (params): Init new field. (OPTION_SPU_NUM_REGIONS): Define. (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add --num-regions. (PARSE_AND_LIST_ARGS_CASES): Handle --num-regions.
Diffstat (limited to 'ld')
-rw-r--r--ld/ChangeLog7
-rw-r--r--ld/emultempl/spuelf.em17
2 files changed, 22 insertions, 2 deletions
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 864cba3..b9588c3 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,5 +1,12 @@
2008-12-10 Alan Modra <amodra@bigpond.net.au>
+ * emultempl/spuelf.em (params): Init new field.
+ (OPTION_SPU_NUM_REGIONS): Define.
+ (PARSE_AND_LIST_LONGOPTS, PARSE_AND_LIST_OPTIONS): Add --num-regions.
+ (PARSE_AND_LIST_ARGS_CASES): Handle --num-regions.
+
+2008-12-10 Alan Modra <amodra@bigpond.net.au>
+
* emultempl/spuelf.em (params): New var, used instead of various others.
Adjust use throughout file.
(spu_after_open): Call spu_elf_setup.
diff --git a/ld/emultempl/spuelf.em b/ld/emultempl/spuelf.em
index cb80c45..bfabb8b 100644
--- a/ld/emultempl/spuelf.em
+++ b/ld/emultempl/spuelf.em
@@ -39,7 +39,7 @@ static struct spu_elf_params params =
&spu_elf_relink,
0, ovly_normal, 0, 0, 0, 0,
0, 0x3ffff,
- 0, 0, 2000
+ 1, 0, 0, 2000
};
static char *auto_overlay_file = 0;
@@ -520,7 +520,8 @@ PARSE_AND_LIST_PROLOGUE='
#define OPTION_SPU_AUTO_OVERLAY (OPTION_SPU_STACK_SYMS + 1)
#define OPTION_SPU_AUTO_RELINK (OPTION_SPU_AUTO_OVERLAY + 1)
#define OPTION_SPU_OVERLAY_RODATA (OPTION_SPU_AUTO_RELINK + 1)
-#define OPTION_SPU_FIXED_SPACE (OPTION_SPU_OVERLAY_RODATA + 1)
+#define OPTION_SPU_NUM_REGIONS (OPTION_SPU_OVERLAY_RODATA + 1)
+#define OPTION_SPU_FIXED_SPACE (OPTION_SPU_NUM_REGIONS + 1)
#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)
@@ -537,6 +538,7 @@ PARSE_AND_LIST_LONGOPTS='
{ "auto-overlay", optional_argument, NULL, OPTION_SPU_AUTO_OVERLAY },
{ "auto-relink", no_argument, NULL, OPTION_SPU_AUTO_RELINK },
{ "overlay-rodata", no_argument, NULL, OPTION_SPU_OVERLAY_RODATA },
+ { "num-regions", required_argument, NULL, OPTION_SPU_NUM_REGIONS },
{ "fixed-space", required_argument, NULL, OPTION_SPU_FIXED_SPACE },
{ "reserved-space", required_argument, NULL, OPTION_SPU_RESERVED_SPACE },
{ "extra-stack-space", required_argument, NULL, OPTION_SPU_EXTRA_STACK },
@@ -557,6 +559,7 @@ PARSE_AND_LIST_OPTIONS='
--auto-relink Rerun linker using auto-overlay script.\n\
--overlay-rodata Place read-only data with associated function\n\
code in overlays.\n\
+ --num-regions Number of overlay buffers (default 1).\n\
--fixed-space=bytes Local store for non-overlay code and data.\n\
--reserved-space=bytes Local store for stack and heap. If not specified\n\
ld will estimate stack size and assume no heap.\n\
@@ -621,6 +624,16 @@ PARSE_AND_LIST_ARGS_CASES='
params.auto_overlay |= 4;
break;
+ case OPTION_SPU_NUM_REGIONS:
+ {
+ char *end;
+ params.num_regions = strtoul (optarg, &end, 0);
+ if (*end == 0)
+ break;
+ einfo (_("%P%F: invalid --num-regions `%s'\''\n"), optarg);
+ }
+ break;
+
case OPTION_SPU_FIXED_SPACE:
{
char *end;