]> granicus.if.org Git - yasm/commitdiff
Merge [2321] (fix for incorrect GOT offset) from trunk.
authorPeter Johnson <peter@tortall.net>
Sun, 16 May 2010 06:29:08 +0000 (06:29 -0000)
committerPeter Johnson <peter@tortall.net>
Sun, 16 May 2010 06:29:08 +0000 (06:29 -0000)
svn path=/branches/yasm-1.0/; revision=2324

modules/objfmts/elf/elf-x86-x86.c
modules/objfmts/elf/tests/elfso.hex

index d2fa6d1e2fc551e49909873bd6d1e353600ec9d4..3c5157fe81d9ae8fbdb696d37c4ed8b61f603142 100644 (file)
@@ -140,18 +140,7 @@ elf_x86_x86_handle_reloc_addend(yasm_intnum *intn,
                                 elf_reloc_entry *reloc,
                                 unsigned long offset)
 {
-    int is_GOT = reloc->is_GOT_sym;
-
-    if (reloc->wrt) {
-        const elf_machine_ssym *ssym = (elf_machine_ssym *)
-            yasm_symrec_get_data(reloc->wrt, &elf_ssym_symrec_data);
-        if (!ssym || reloc->valsize != ssym->size)
-            yasm_internal_error(N_("Unsupported WRT"));
-        if (ssym->reloc == R_386_GOTPC)
-            is_GOT = 1;
-    }
-
-    if (is_GOT && reloc->valsize == 32 && offset != 0)
+    if (!reloc->wrt && reloc->is_GOT_sym && reloc->valsize == 32 && offset != 0)
     {
         yasm_intnum *off_intn = yasm_intnum_create_uint(offset);
         yasm_intnum_calc(intn, YASM_EXPR_ADD, off_intn);
index 94a50cbd02718fe9cc54d56a0f121301e808ed76..206cce9c6d446e39328707da0b977f9978eeb0d6 100644 (file)
@@ -88,7 +88,7 @@ e8
 5b 
 81 
 c3 
-05 
+03 
 00 
 00 
 00