瀏覽代碼

* fixup the asmbind of aliases (an llvm alias can never refer to an
external symbol)

git-svn-id: trunk@34514 -

Jonas Maebe 9 年之前
父節點
當前提交
dfb20f3f6a
共有 1 個文件被更改,包括 11 次插入0 次删除
  1. 11 0
      compiler/llvm/aasmllvm.pas

+ 11 - 0
compiler/llvm/aasmllvm.pas

@@ -256,6 +256,17 @@ uses
         newsym:=current_asmdata.DefineAsmSymbol(newname,AB_GLOBAL,AT_FUNCTION,_def);
         newsym.declared:=true;
         def:=_def;
+        { alias cannot be external }
+        case _bind of
+          { weak external should actually become weak, but we don't support that
+            yet }
+          AB_WEAK_EXTERNAL:
+            internalerror(2016071203);
+          AB_EXTERNAL:
+            _bind:=AB_GLOBAL;
+          AB_EXTERNAL_INDIRECT:
+            _bind:=AB_INDIRECT;
+        end;
         bind:=_bind;
       end;