bfd/
[deliverable/binutils-gdb.git] / bfd / elf32-s390.c
index 287e683d82ab8fccb9ec6926e0070d715145ef71..83bf5e12c15dbca25fc59772d63a83901bf95523 100644 (file)
@@ -2630,14 +2630,18 @@ elf_s390_relocate_section (output_bfd, info, input_bfd, input_section,
 
                          osec = sec->output_section;
                          sindx = elf_section_data (osec)->dynindx;
-                         BFD_ASSERT (sindx > 0);
+                         if (sindx == 0)
+                           {
+                             osec = htab->elf.text_index_section;
+                             sindx = elf_section_data (osec)->dynindx;
+                           }
+                         BFD_ASSERT (sindx != 0);
 
                          /* We are turning this relocation into one
                             against a section symbol, so subtract out
                             the output section's address but not the
                             offset of the input section in the output
                             section.  */
-
                          outrel.r_addend -= osec->vma;
                        }
                      outrel.r_info = ELF32_R_INFO (sindx, r_type);
@@ -3542,6 +3546,7 @@ elf_s390_plt_sym_val (bfd_vma i, const asection *plt,
 #define elf_backend_reloc_type_class         elf_s390_reloc_type_class
 #define elf_backend_relocate_section         elf_s390_relocate_section
 #define elf_backend_size_dynamic_sections     elf_s390_size_dynamic_sections
+#define elf_backend_init_index_section       _bfd_elf_init_1_index_section
 #define elf_backend_reloc_type_class         elf_s390_reloc_type_class
 #define elf_backend_grok_prstatus            elf_s390_grok_prstatus
 #define elf_backend_plt_sym_val                      elf_s390_plt_sym_val
This page took 0.024481 seconds and 4 git commands to generate.