summaryrefslogtreecommitdiffstats
path: root/binutils-2.25/bfd/elf32-spu.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils-2.25/bfd/elf32-spu.c')
-rw-r--r--binutils-2.25/bfd/elf32-spu.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/binutils-2.25/bfd/elf32-spu.c b/binutils-2.25/bfd/elf32-spu.c
index 13806ad1..ebc9e6a0 100644
--- a/binutils-2.25/bfd/elf32-spu.c
+++ b/binutils-2.25/bfd/elf32-spu.c
@@ -1828,6 +1828,18 @@ ovl_mgr_pread (struct bfd *abfd ATTRIBUTE_UNUSED,
return count;
}
+static int
+ovl_mgr_stat (struct bfd *abfd ATTRIBUTE_UNUSED,
+ void *stream,
+ struct stat *sb)
+{
+ struct _ovl_stream *os = (struct _ovl_stream *) stream;
+
+ memset (sb, 0, sizeof (*sb));
+ sb->st_size = (const char *) os->end - (const char *) os->start;
+ return 0;
+}
+
bfd_boolean
spu_elf_open_builtin_lib (bfd **ovl_bfd, const struct _ovl_stream *stream)
{
@@ -1837,7 +1849,7 @@ spu_elf_open_builtin_lib (bfd **ovl_bfd, const struct _ovl_stream *stream)
(void *) stream,
ovl_mgr_pread,
NULL,
- NULL);
+ ovl_mgr_stat);
return *ovl_bfd != NULL;
}