* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
[deliverable/binutils-gdb.git] / bfd / elf32-sparc.c
index fff9fa2edc2b45f47b06b1766b09429d94a1e397..a11db81c305300fcd8ca1304d2995345263c10c0 100644 (file)
@@ -1467,6 +1467,17 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
                  if (!(outrel.r_offset & 3))
                    r_type = R_SPARC_32;
                  break;
+               case R_SPARC_DISP8:
+               case R_SPARC_DISP16:
+               case R_SPARC_DISP32:
+                 /* If the symbol is not dynamic, we should not keep
+                    a dynamic relocation.  But an .rela.* slot has been
+                    allocated for it, output R_SPARC_NONE.
+                    FIXME: Add code tracking needed dynamic relocs as
+                    e.g. i386 has.  */
+                 if (h->dynindx == -1)
+                   skip = true, relocate = true;
+                 break;
                }
 
              if (skip)
This page took 0.022592 seconds and 4 git commands to generate.