Kaynağa Gözat

* fixed r13469 (PLT entries are not GOT-relative). Not reverting all the
changes from that commit, because not hardcoding the use of
current_procinfo in all cases when obtaining the GOT register is
cleaner

git-svn-id: trunk@13470 -

Jonas Maebe 16 yıl önce
ebeveyn
işleme
baf1ac22b7
1 değiştirilmiş dosya ile 1 ekleme ve 20 silme
  1. 1 20
      compiler/x86/cgx86.pas

+ 1 - 20
compiler/x86/cgx86.pas

@@ -2123,26 +2123,7 @@ unit cgx86;
         if (cs_create_pic in current_settings.moduleswitches) and
            { darwin/x86_64's assembler doesn't want @PLT after call symbols }
            (target_info.system<>system_x86_64_darwin) then
-          begin
-            ref.refaddr:=addr_pic;
-{$ifdef i386}
-            { it could be that we're called from a procedure not having the
-              got loaded. Since all volatile registers can contain parameters,
-              we have to use the stack.
-            }
-            list.concat(taicpu.op_reg(A_PUSH,S_L,NR_EBX));
-            ref.base:=g_maybe_got_init(list,true);
-            if (ref.base<>NR_EBX) then
-              internalerror(2009072801);
-            list.concat(taicpu.op_ref_reg(A_MOV,S_L,ref,NR_EBX));
-            reference_reset_base(ref,NR_ESP,0,sizeof(pint));
-            { restore ebx to its original value, and place target address
-              on the stack }
-            list.concat(taicpu.op_reg_ref(A_XCHG,S_L,NR_EBX,ref));
-            list.concat(taicpu.op_none(A_RET));
-            exit;
-{$endif i386}
-          end
+          ref.refaddr:=addr_pic
         else
           ref.refaddr:=addr_full;
         list.concat(taicpu.op_ref(A_JMP,S_NO,ref));