diff options
author | Nick Clifton <nickc@redhat.com> | 2002-12-03 18:52:44 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2002-12-03 18:52:44 +0000 |
commit | ed74f547b1a8f0cfec222ec523aa556c33345c9e (patch) | |
tree | 487a65094647edf0679392117c4adf9537697fb7 /bfd | |
parent | c55270c92704a41a7481bca401030d6bd14487cc (diff) | |
download | gdb-ed74f547b1a8f0cfec222ec523aa556c33345c9e.tar.gz |
Fix typo in ChangeLog entry.
Add paranoia checks to .PPC.EMB.apuinfo merging code.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/elf32-ppc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index c117f54b200..7cb4d86312b 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -3901,6 +3901,9 @@ ppc_elf_begin_write_processing (abfd, link_info) unsigned long length; const char * error_message = NULL; + if (link_info == NULL) + return; + /* Scan the input bfds, looking for apuinfo sections. */ num_input_sections = 0; output_section_size = 0; @@ -4023,7 +4026,7 @@ ppc_elf_write_section (abfd, asec, contents) asection * asec; bfd_byte * contents ATTRIBUTE_UNUSED; { - return strcmp (asec->name, APUINFO_SECTION_NAME) == 0; + return apuinfo_list_length () && strcmp (asec->name, APUINFO_SECTION_NAME) == 0; } @@ -4044,6 +4047,9 @@ ppc_elf_final_write_processing (abfd, linker) if (asec == NULL) return; + if (apuinfo_list_length () == 0) + return; + length = asec->_raw_size; if (length < 20) return; |