diff options
author | Alan Modra <amodra@gmail.com> | 2008-09-29 14:12:02 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2008-09-29 14:12:02 +0000 |
commit | ceae84aacf0d5459a74fd5496cd2c0d6708e052a (patch) | |
tree | 58aa23fa1daf3894218aa395c3f815b3776d4b4c /bfd/elf32-spu.c | |
parent | b8a4873487ea15d1873dfaf0cb1a724a3b5fec95 (diff) | |
download | binutils-ceae84aacf0d5459a74fd5496cd2c0d6708e052a.tar.gz binutils-ceae84aacf0d5459a74fd5496cd2c0d6708e052a.tar.bz2 binutils-ceae84aacf0d5459a74fd5496cd2c0d6708e052a.zip |
bfd/
PR 6789
* elf.c (assign_file_positions_for_load_sections): Call
_bfd_elf_map_sections_to_segments, not elf_modify_segment_map.
(get_program_header_size): Protect against NULL info.
(_bfd_elf_map_sections_to_segments): Likewise.
* elf32-spu.c (spu_elf_additional_program_headers): Likewise.
ld/testsuite/
* ld-elf/extract-symbol-1sec.d: Correct section lma.
Diffstat (limited to 'bfd/elf32-spu.c')
-rw-r--r-- | bfd/elf32-spu.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bfd/elf32-spu.c b/bfd/elf32-spu.c index 17ff079c0cc..00681b2b5b9 100644 --- a/bfd/elf32-spu.c +++ b/bfd/elf32-spu.c @@ -4245,10 +4245,15 @@ spu_elf_post_process_headers (bfd *abfd, static int spu_elf_additional_program_headers (bfd *abfd, struct bfd_link_info *info) { - struct spu_link_hash_table *htab = spu_hash_table (info); - int extra = htab->num_overlays; + int extra = 0; asection *sec; + if (info != NULL) + { + struct spu_link_hash_table *htab = spu_hash_table (info); + extra = htab->num_overlays; + } + if (extra) ++extra; |