summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1999-06-22 21:01:24 +0000
committerIan Lance Taylor <ian@airs.com>1999-06-22 21:01:24 +0000
commit6ea700528a750c81a30d9cdb4d2ad887cdc1bd31 (patch)
tree05e4e6fc4b52413fb5b69dd520de0ac269d01481
parent5bd15f53d661149093af9d735fe1ad83cd9681d8 (diff)
downloadgdb-6ea700528a750c81a30d9cdb4d2ad887cdc1bd31.tar.gz
From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
* elf32-ppc.c (ppc_elf_size_dynamic_sections): Set unused dynindx field to 0, not -1. (ppc_elf_finish_dynamic_sections): Check for positive section dynindx field, rather than comparing against -1. (ppc_elf_relocate_section): Only return false if undefined_symbol or reloc_overflow fail, not always upon encountering an error.
-rw-r--r--bfd/ChangeLog10
-rw-r--r--bfd/elf32-ppc.c45
2 files changed, 33 insertions, 22 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 6da6d4ebe30..aa2ebec5b27 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,13 @@
+1999-06-22 Ian Lance Taylor <ian@zembu.com>
+
+ From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set unused dynindx
+ field to 0, not -1.
+ (ppc_elf_finish_dynamic_sections): Check for positive section
+ dynindx field, rather than comparing against -1.
+ (ppc_elf_relocate_section): Only return false if undefined_symbol
+ or reloc_overflow fail, not always upon encountering an error.
+
1999-06-22 Mark Mitchell <mark@codesourcery.com>
* elflink.h (link_read_relocs): Explicitly cast external_relocs to
diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c
index b84b863952f..639171d9124 100644
--- a/bfd/elf32-ppc.c
+++ b/bfd/elf32-ppc.c
@@ -2102,7 +2102,7 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
if ((s->flags & SEC_LINKER_CREATED) != 0
|| (s->flags & SEC_ALLOC) == 0)
{
- elf_section_data (s)->dynindx = -1;
+ elf_section_data (s)->dynindx = 0;
continue;
}
@@ -2949,7 +2949,7 @@ ppc_elf_finish_dynamic_sections (output_bfd, info)
indx = elf_section_data (s)->this_idx;
dindx = elf_section_data (s)->dynindx;
- if (dindx != -1)
+ if (dindx > 0)
{
BFD_ASSERT(indx > 0);
BFD_ASSERT(dindx > 0);
@@ -3200,12 +3200,13 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = 0;
else
{
- (*info->callbacks->undefined_symbol)(info,
- h->root.root.string,
- input_bfd,
- input_section,
- rel->r_offset);
- ret = false;
+ if (! (*info->callbacks->undefined_symbol)(info,
+ h->root.root.string,
+ input_bfd,
+ input_section,
+ rel->r_offset))
+ return false;
+ relocation = 0;
continue;
}
}
@@ -3230,12 +3231,12 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|| h->root.type == bfd_link_hash_defweak)
&& sec->output_section == NULL)
{
- (*info->callbacks->undefined_symbol) (info,
- h->root.root.string,
- input_bfd,
- input_section,
- rel->r_offset);
- ret = false;
+ if (! (*info->callbacks->undefined_symbol) (info,
+ h->root.root.string,
+ input_bfd,
+ input_section,
+ rel->r_offset))
+ return false;
continue;
}
break;
@@ -3784,14 +3785,14 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd, sec);
}
- (*info->callbacks->reloc_overflow)(info,
- name,
- howto->name,
- (bfd_vma) 0,
- input_bfd,
- input_section,
- offset);
- ret = false;
+ if (! (*info->callbacks->reloc_overflow)(info,
+ name,
+ howto->name,
+ (bfd_vma) 0,
+ input_bfd,
+ input_section,
+ offset))
+ return false;
}
else
ret = false;