This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
SDAREL output sections
- To: binutils at sourceware dot cygnus dot com
- Subject: SDAREL output sections
- From: Momchil Velikov <velco at fadata dot bg>
- Date: 18 Feb 2001 19:15:41 +0200
2001-02-18 Momchil Velikov <velco@fadata.bg>
* elf32-ppc.c (ppc_elf_relocate_section): Do not fail with
an error if the output section of the target of R_PPC_SDAREL16
and R_PPC_EMB_SDA2REL relocations is not one of .sdata, .sbss,
.sdata2 or .sbss2.
--- elf32-ppc.c.orig.0 Sun Feb 18 13:14:15 2001
+++ elf32-ppc.c Sun Feb 18 19:07:06 2001
@@ -3478,49 +3478,16 @@
/* relocate against _SDA_BASE_ */
case (int) R_PPC_SDAREL16:
- {
- const char *name;
-
- BFD_ASSERT (sec != (asection *) 0);
- name = bfd_get_section_name (abfd, sec->output_section);
- if (strcmp (name, ".sdata") != 0
- && strcmp (name, ".sbss") != 0)
- {
- (*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
- bfd_get_filename (input_bfd),
- sym_name,
- ppc_elf_howto_table[(int) r_type]->name,
- name);
- }
- addend -= (sdata->sym_hash->root.u.def.value
- + sdata->sym_hash->root.u.def.section->output_section->vma
- + sdata->sym_hash->root.u.def.section->output_offset);
- }
+ addend -= (sdata->sym_hash->root.u.def.value
+ + sdata->sym_hash->root.u.def.section->output_section->vma
+ + sdata->sym_hash->root.u.def.section->output_offset);
break;
/* relocate against _SDA2_BASE_ */
case (int) R_PPC_EMB_SDA2REL:
- {
- const char *name;
-
- BFD_ASSERT (sec != (asection *) 0);
- name = bfd_get_section_name (abfd, sec->output_section);
- if (strcmp (name, ".sdata2") != 0 && strcmp (name, ".sbss2") != 0)
- {
- (*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
- bfd_get_filename (input_bfd),
- sym_name,
- ppc_elf_howto_table[(int) r_type]->name,
- name);
-
- bfd_set_error (bfd_error_bad_value);
- ret = false;
- continue;
- }
- addend -= (sdata2->sym_hash->root.u.def.value
- + sdata2->sym_hash->root.u.def.section->output_section->vma
- + sdata2->sym_hash->root.u.def.section->output_offset);
- }
+ addend -= (sdata2->sym_hash->root.u.def.value
+ + sdata2->sym_hash->root.u.def.section->output_section->vma
+ + sdata2->sym_hash->root.u.def.section->output_offset);
break;
/* relocate against either _SDA_BASE_, _SDA2_BASE_, or 0 */