* mn10300.h (elf_mn10300_reloc_type): Add R_MN10300_TLS_GD,
[deliverable/binutils-gdb.git] / bfd / elf32-i386.c
index 01c06695956ad0c3714a60b6e6f156f2ed3f475e..d1873051b4d9bc692b86b23b6277e3718f00864f 100644 (file)
@@ -3257,6 +3257,7 @@ elf_i386_relocate_section (bfd *output_bfd,
                  bfd_byte *loc;
                  asection *sreloc;
                  bfd_vma offset;
+                 bfd_boolean relocate;
 
                  /* Need a dynamic relocation to get the real function
                     adddress.  */
@@ -3277,15 +3278,14 @@ elf_i386_relocate_section (bfd *output_bfd,
                      || info->executable)
                    {
                      /* This symbol is resolved locally.  */
-                     outrel.r_info = ELF32_R_INFO (0, R_386_IRELATIVE);
-                     bfd_put_32 (output_bfd,
-                                 (h->root.u.def.value
-                                  + h->root.u.def.section->output_section->vma
-                                  + h->root.u.def.section->output_offset),
-                                 contents + offset);
+                     outrel.r_info = ELF32_R_INFO (0, R_386_RELATIVE);
+                     relocate = TRUE;
                    }
                  else
-                   outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
+                   {
+                     outrel.r_info = ELF32_R_INFO (h->dynindx, r_type);
+                     relocate = FALSE;
+                   }
 
                  sreloc = htab->elf.irelifunc;
                  loc = sreloc->contents;
@@ -3298,7 +3298,8 @@ elf_i386_relocate_section (bfd *output_bfd,
                     we need to include the symbol value so that it
                     becomes an addend for the dynamic reloc.  For an
                     internal symbol, we have updated addend.  */
-                 continue;
+                 if (! relocate)
+                   continue;
                }
              /* FALLTHROUGH */
            case R_386_PC32:
This page took 0.024774 seconds and 4 git commands to generate.